Re: benchmarking the query planner

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: benchmarking the query planner
Дата
Msg-id 8020.1229105929@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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  ("Greg Stark" <stark@enterprisedb.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> As I said, we would only increase sample for ndistinct, not for others.

How will you do that?  Keep in mind that one of the things we have to do
to compute ndistinct is to sort the sample.  ISTM that the majority of
the cost of a larger sample is going to get expended anyway ---
certainly we could form the histogram using the more accurate data at
precisely zero extra cost, and I think we have also pretty much done all
the work for MCV collection by the time we finish counting the number of
distinct values.

I seem to recall Greg suggesting that there were ways to estimate
ndistinct without sorting, but short of a fundamental algorithm change
there's not going to be a win here.

> Right now we may as well use a random number generator.

Could we skip the hyperbole please?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: benchmarking the query planner
Следующее
От: Tom Lane
Дата:
Сообщение: Re: benchmarking the query planner