Обсуждение: Difference between check and a small table

Поиск
Список
Период
Сортировка

Difference between check and a small table

От
Дата:
Hello,

Suppose I have one table, and one field (of this table) which accepts only a
certain range of values (they do not need to be continuous though).
What is the difference in the number of operations performed by postgres on
insert/update of data to this field if I use:
- check clauses
OR
- a foreign key referencing another small table with those values?

Is there any significant performance improvement in using one method instead
of another?

Thanks in advance,
Enio