Re: Subplan result caching - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Subplan result caching
Date
Msg-id CA+Tgmoa9SOnygHgooUsoMNhx8Fa=v07G0wfuVoO4KkcJVyf29g@mail.gmail.com
Whole thread Raw
In response to Re: Subplan result caching  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, May 23, 2018 at 12:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Ah.  That would work, though it'd make the number of subquery executions
> even less predictable (since some logically-equal values would compare
> as physically unequal).

In most cases that seems fine.  It might not be fine with the subquery
contains volatile functions, though.  I think I'd be sad if I wrote a
query expecting random() to be executing 26000 times and it got
executed 11 times instead.  But if the optimizer finds a way to
execute int4pl fewer times, that seems like a good thing.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Enhancement Idea - Expose the active value of a parameter in pg_settings
Next
From: Robert Haas
Date:
Subject: Re: Subplan result caching