Options

Optimized merge with composite primary key

Is it possible to execute an optimized merge with multiple columns in on clause where the target table has a composite key?

 

Something similar to 


MERGE INTO table1 t1 USING table2 t2 on (t1.col1 = t2.col1 and t1.col2 = t2.col2)
WHEN MATCHED THEN UPDATE SET col1 = t2.col1, col2 = t2.col2


where t1 has a primary key defined as CONSTRAINT composite_pk PRIMARY KEY (col1, col2)

 

https://my.vertica.com/docs/7.1.x/HTML/Content/Authoring/AdministratorsGuide/Tables/OptimizedVsNonOptimizedMerge.htm

Comments

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file