Disclaimer: My DB knowledge comes mostly from Mysql so I might misunderstand some things in vertica...
I would like to know if there exist a technique of insert
Vertica does not enforce uniqueness of primary key or unique constraints on load due to the potential overhead associated with the operation.
If ANALYZE_CONSTRAINTS()
is run before committing, you should be able to capture potential duplicates. There's also overhead with doing UPDATE
s and those should be avoided.
There are ways to enforce uniqueness on load such as using MERGE
, or staging the data in a temporary table. Each method has its own limitations. You can read more about enforcing uniqueness of data in my blog post.
Update: As of 7.2, Vertica can automatically enforce primary and unique key constraints. See the documentation for more information.