Re: benchmarking the query planner - Mailing list pgsql-hackers

From Tom Lane
Subject Re: benchmarking the query planner
Date
Msg-id 6558.1229098576@sss.pgh.pa.us
Whole thread Raw
In response to Re: benchmarking the query planner  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: benchmarking the query planner  (Simon Riggs <simon@2ndQuadrant.com>)
Re: benchmarking the query planner  (Simon Riggs <simon@2ndQuadrant.com>)
Re: benchmarking the query planner  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> For that matter, if we do consider sampling 5% of the table we may as well
> just go ahead and scan the whole table. It wouldn't take much longer and it
> would actually produce good estimates.

Yeah.  Anything over a small fraction of a percent is going to imply
fetching every page anyway, for typical row widths.  If you want ANALYZE
to be cheap then you simply don't get to have a trustworthy value of
ndistinct.

Perhaps a better plan is to try to de-emphasize use of ndistinct,
though I concede I have no idea how to do that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: benchmarking the query planner
Next
From: "Kevin Grittner"
Date:
Subject: Re: benchmarking the query planner