Search code examples
singlestore

Unenforced Unique vs enforced Unique in memsql


I find this abit confusing. Iam using memsql column store. I try to understand if there is a way to enforce duplications on specific key (e.g eventId). I found some doc regarding Unenforced Unique but I didnt really understand its intention.


Solution

  • The point of unenforced unique keys is as a hint:

    An unenforced unique constraint is informational: the query planner may use the unenforced unique constraint as a hint to choose better query plans.

    from https://docs.memsql.com/v6.8/concepts/unenforced-unique-constraints/.

    Unfortunately MemSQL does not support (enforced) unique constraints on columnstore tables.