From: | Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Christoph Berg <myon(at)debian(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Surjective functional indexes |
Date: | 2018-03-02 12:34:12 |
Message-ID: | ca0a8ddb-33a3-d7e8-58d7-aeddcb246830@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01.03.2018 22:48, Andres Freund wrote:
> Hi,
>
> I still don't think, as commented upon by Tom and me upthread, that we
> want this feature in the current form.
>
> Your arguments about layering violations seem to be counteracted by the
> fact that ProjectionIsNotChanged() basically appears to do purely
> executor work inside inside heapam.c.
ProjectionIsNotChanged doesn't perform evaluation itslef, is calls FormIndexDatum.
FormIndexDatum is also called in 13 other places in Postgres:
analyze.c, constraint.c, index.c, tuplesort, execIndexing.c
I still think that trying to store somewhere result odf index expression evaluation to be able to reuse in index update is not so good idea:
it complicates code and add extra dependencies between different modules.
And benefits of such optimization are not obvious: is index expression evaluation is so expensive, then recheck_on_update should be prohibited for such index at all.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2018-03-02 12:34:47 | Re: perltidy version |
Previous Message | Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= | 2018-03-02 12:30:08 | Re: perltidy version |