Re: slow queries over information schema.tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: slow queries over information schema.tables
Дата
Msg-id 8843.1544035292@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: slow queries over information schema.tables  (Andres Freund <andres@anarazel.de>)
Ответы Re: slow queries over information schema.tables  (Andres Freund <andres@anarazel.de>)
Re: slow queries over information schema.tables  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2018-12-05 13:22:23 -0500, Tom Lane wrote:
>> Not following what you have in mind here?  My 0002 throws away the
>> CoerceToDomain if there are *no* constraints, but I can't see any
>> situation in which we'd likely be able to ignore a constraint,
>> simple or not.

> Yea, simple probably means nonexistant for now. We could e.g. optimize
> some NOT NULL checks away, but it's probably not worth it.

Ah, yes, that is a case where we might have enough knowledge to prove
the test redundant --- but considering that we explicitly discourage
domain NOT NULL as bad style and not fully supported, I can't get
excited about it.  I suppose in some cases we might be able to use
predtest.c to prove domain CHECK constraints redundant, but I bet that
it's not worth the trouble.

The bigger picture here is that people seem to like to use domains
as simple type aliases, which will never have any constraints, but
we're very dumb about that today.  So the patch as presented seems
like it has lots of potential applicability, as long as we fix the
invalidation aspect.

            regards, tom lane


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: plpgsql pragma statement
Следующее
От: Andres Freund
Дата:
Сообщение: Re: slow queries over information schema.tables