Re: Why overhead of SPI is so large?

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: Why overhead of SPI is so large?
Дата
Msg-id ae38c01f-13cb-0e0a-bd35-c5ce92406425@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Why overhead of SPI is so large?  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Why overhead of SPI is so large?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers


On 23.08.2019 14:42, Pavel Stehule wrote:

In reality it is not IMMUTABLE function. On second hand, there are lot of application that depends on this behave.

It is well know trick how to reduce estimation errors related to JOINs. When immutable function has constant parameters, then it is evaluated in planning time.

So sometimes was necessary to use

SELECT ... FROM tab WHERE foreign_key = immutable_function('constant parameter')

instead JOIN.

It is ugly, but it is working perfectly. I think so until we will have multi table statistics, this behave should be available in Postgres.

Sure, this function should not be used for functional indexes.
 

What about the following version of the patch?



-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 
Вложения

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

Предыдущее
От: Roberto Mireles
Дата:
Сообщение: Hstore OID bigger than an integer
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)