Unique Contrains in Vertica DB

戏子无情 提交于 2019-12-02 03:25:33

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 UPDATEs 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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!