We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Optimized merge with composite primary key — Vertica Forum

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
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
You can use Markdown in your post.