Re: benchmarking the query planner (was Re: Simple postgresql.conf wizard) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: benchmarking the query planner (was Re: Simple postgresql.conf wizard)
Date
Msg-id 27386.1228755366@sss.pgh.pa.us
Whole thread Raw
In response to Re: benchmarking the query planner (was Re: Simple postgresql.conf wizard)  (Greg Stark <greg.stark@enterprisedb.com>)
Responses Re: benchmarking the query planner (was Re: Simple postgresql.conf wizard)  ("Robert Haas" <robertmhaas@gmail.com>)
List pgsql-hackers
Greg Stark <greg.stark@enterprisedb.com> writes:
> That might only be the case when the pg_statistic record is in shared  
> buffers.

Yeah, it seems unlikely that disabling compression is a good idea in the
bigger scheme of things.

> Also I wonder if eqjoinsel and company might need to be made more  
> toast-aware by detoasring all the things it needs once rather than  
> every time it accesses them.

At least in this example, the same stats arrays are fetched multiple
times per query.  It might be worth teaching the planner to cache those
results internally during a plan cycle --- this would avoid most of the
complexity associated with caching (ie, figuring out when to clear the
cache) and still get maybe a 2x or 3x or so win.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Optimizing DISTINCT with LIMIT
Next
From: "Robert Haas"
Date:
Subject: Re: benchmarking the query planner (was Re: Simple postgresql.conf wizard)