[Info-ingres] Structure vs Index

nikosv nikos.vaggalis at gmail.com
Thu Nov 24 09:55:24 UTC 2022


When you set a PK in creating a table,a secondary index is created on the key.The table is heap with a secondary btree index by default.

When you don't set a PK at the table's creation time and instead modify
the table's structure to btree unique on the key afterwards, it acts like a PK constraint in not allowing duplicates.

However how is this enforced ? I searched through the catalogue like iiindexes,
iiconstraints etc and I can't find anything.Also, in that case when doing a select straight on the key does it use the structure to retrieve the rows? Does it mean that I don't need to manually assign an index on the table's key and can just rely on the structure?



More information about the Info-ingres mailing list