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

From Nathan Boley
Subject Re: benchmarking the query planner
Date
Msg-id 6fa3b6e20812111612m74555e44sfd3ef0ce5431ea9d@mail.gmail.com
Whole thread Raw
In response to Re: benchmarking the query planner  ("Vladimir Sitnikov" <sitnikov.vladimir@gmail.com>)
Responses Re: benchmarking the query planner  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>> What is the specific difference between what you are talking about and
>> what scalarineqsel already implements?
>
> Hmm... Northing new. Feel sorry for bothering you. I did not realize
> histograms are implemented.
>

Well, ISTM there is a profound difference. For scalarineqsel we care
about the total number of values in a bucket. For eqsel  we care about
the total number of *distinct* values in each bucket ( which we don't
track ).

IMHO, the whole idea of increasing mcv's seems a mistake. Why not use
the limited storage in pg_statistic to try and estimate the
selectivity for ranges of values rather than a single value? That
gives way better coverage of the distribution. If the number of values
is too high to fit in a single bucket we put it in an mcv slot
anyways. *That* should be the mechanism by which the number of mcv's
increases.

I guess this is a bit off topic for the middle of a commit fest though.

-Nathan


pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)
Next
From: Tom Lane
Date:
Subject: Re: benchmarking the query planner