From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Cc: | "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, David Brown <time(at)bigpond(dot)net(dot)au> |
Subject: | Re: Analyzer is clueless |
Date: | 2004-11-18 01:41:16 |
Message-ID: | 200411171741.16515.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Jim,
> Is there still a good reason to have the histogram stats so low? Should
> the default be changed to more like 100 at this point?
Low overhead. This is actually a TODO for me for 8.1. I need to find some
test cases to set a differential level of histogram access for indexed
fields, so like 10 for most fields but 100/150/200 for indexed fields.
However, I got stalled on finding test cases and then ran out of time.
> Also, how extensively does the planner use n_distinct, null_frac,
> reltuples and the histogram to see what the odds are of finding a unique
> value or a low number of values? I've seen cases where it seems the
> planer doesn't think it'll be getting a unique value or a small set of
> values even though stats indicates that it should be.
>
> One final question... would there be interest in a process that would
> dynamically update the histogram settings for tables based on how
> distinct/unique each field was?
Well, the process by which the analyzer decides that a field is unique could
probably use some troubleshooting. And we always, always could use
suggestions/tests/help with the query planner.
--
--Josh
Josh Berkus
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-11-18 01:57:44 | Re: Analyzer is clueless |
Previous Message | Jim C. Nasby | 2004-11-18 00:20:09 | Re: Analyzer is clueless |