From: | Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Why overhead of SPI is so large? |
Date: | 2019-08-23 14:32:02 |
Message-ID: | [email protected] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
plpgsql_exec_expr-2.patch | text/x-patch | 2.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2019-08-23 14:35:17 | Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS) |
Previous Message | Roberto Mireles | 2019-08-23 13:58:50 | Hstore OID bigger than an integer |