Re: Order of enforcement of CHECK constraints?

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Order of enforcement of CHECK constraints?
Дата
Msg-id CAApHDvqcVW8G8JbjDJS3VsvubR62jYkbSg8VJDb4J9nEdxKBxw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Order of enforcement of CHECK constraints?  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Список pgsql-hackers
On 24 March 2015 at 17:51, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote:

In case of million inserts or bulk load with constraints on, these few cycles spent in ordering the constraints might be problematic, unless the ordering happens only once for a series of inserts.

 
As far as I can see this sort only occurs when a new relation is loaded into the relcache. Relations are cached in the relcache when they're accessed for the first time in each backend, and the cache will be invalidated when the current backend or another backend perform DDL on that relation. 

Without relcache we'd need to lookup the system catalogs for just about every SQL statement... This would be very slow indeed! 

Regards

David Rowley

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

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Re: Abbreviated keys for Numeric
Следующее
От: Thom Brown
Дата:
Сообщение: Error with index on unlogged table