Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 24 Jan 2011 @ 12:58:04 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Merge & Upsert in Teradata.
 
From:   David Clough

Just as a test, I've got a Merge working, with the source being a Select from a Table i.e. a SET based Merge.

All well and good, but when it comes to looking at the performance of the Merge vs a more tradition Insert and an Update, I get a mixed result.

Inserting ~ 5 Million rows into an EMPTY Table was roughly twice as fast using the Merge, compared to an 'Update through a Join' followed by an 'Insert Where Not Exists'.

However, when it came to then an incremental run, having ~ 100k Inserts and ~1k Updates, the Merge took roughly 5 times as long as the compound of two separate Update and Insert statements !

btw, Primary Index between Source and Target Tables were, in my example, co-located.

Do these sort of figures concur with others' findings, or do I need to take into account other factors ?


Regards

David Clough
Database Developer
Database Design Group



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023