Re: R: [GENERAL] Slow queries on very big (and partitioned) table

Поиск
Список
Период
Сортировка
От Steven Winfield
Тема Re: R: [GENERAL] Slow queries on very big (and partitioned) table
Дата
Msg-id E9FA92C2921F31408041863B74EE4C20016CDF1396@CCPMAILDAG03.cantab.local
обсуждение исходный текст
Ответ на Re: R: [GENERAL] Slow queries on very big (and partitioned) table  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
> Unfortunately, that'll require locking each table and scanning it to make sure that the CHECK constraint isn't
violated.

Actually, CHECK constraints can be added with the NOT VALID clause.
New tuples will be checked immediately, while the validation of existing tuples can be done later using ALTER TABLE ...
VALIDATECONSTRAINT ... which takes a less invasive lock than if you'd omitted NOT VALID. 

Steve.



В списке pgsql-general по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: R: [GENERAL] Slow queries on very big (and partitioned) table
Следующее
От: John R Pierce
Дата:
Сообщение: Re: [GENERAL] Slow queries on very big (and partitioned) table