Re: [HACKERS] WIP Patch: Precalculate stable functions,infrastructure v1 - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] WIP Patch: Precalculate stable functions,infrastructure v1
Date
Msg-id CA+TgmoZgD1-4-b5Ve577fXsgQY0KHXqS13DdW3ooyhH-Sr+UMw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] WIP Patch: Precalculate stable functions,infrastructure v1  (Marina Polyakova <m.polyakova@postgrespro.ru>)
Responses Re: [HACKERS] WIP Patch: Precalculate stable functions,infrastructure v1
Re: [HACKERS] WIP Patch: Precalculate stable functions,infrastructure v1
List pgsql-hackers
On Tue, Jul 18, 2017 at 9:16 AM, Marina Polyakova
<m.polyakova@postgrespro.ru> wrote:
> Here I have made the 5th version of the patches. I have added the
> precalculation of all primitive nodes that don't return set, are not
> volatile themselves and their arguments are constant or precalculated
> expressions too. There're regression tests for all of them and little notes
> in the documentation. Like for the previous patches it seems that there is
> no obvious performance degradation too on regular queries (according to
> pgbench).

pgbench probably isn't a very good test for this sort of thing - it
only issues very short-running queries where the cost of evaluating
expressions is a relatively small part of the total cost.  Even if
things get worse, I'm not sure if you'd see it.  I'm not sure exactly
how you could construct a test case that could be harmed by this patch
- I guess you'd want to initialize lots of CacheExprs but never make
use of the caching usefully?

It could also be useful to test things like TPC-H to see if you get an
improvement.

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



pgsql-hackers by date:

Previous
From: Alik Khilazhev
Date:
Subject: Re: [HACKERS] [WIP] Zipfian distribution in pgbench
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] GSoC 2017: weekly progress reports (week 7)