Re: Why is explain horribly optimistic for sorts?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why is explain horribly optimistic for sorts?
Дата
Msg-id 7019.983643523@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Why is explain horribly optimistic for sorts?  (Ben <bench@silentmedia.com>)
Список pgsql-general
Ben <bench@silentmedia.com> writes:
> Yes, it is horribly wrong.
> select count(*) FROM jennyann where target like '/music/%'
> gives me 93686 rows.

Well, that misestimation is the source of the problem, then, not any
misestimation of the cost of a sort.

7.0 didn't have very good estimation rules for LIKE clauses, at least
not by default.  Have you tried the new LIKE estimator (see
contrib/likeplanning/README in the source tree)?  I'm not sure it will
do any better, given that your data appears to be mightily nonuniform
;-), but it's worth a try.

            regards, tom lane

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

Предыдущее
От: Ben
Дата:
Сообщение: Re: Why is explain horribly optimistic for sorts?
Следующее
От: will trillich
Дата:
Сообщение: Re: can a trigger on insert -> update other tables?