Re: When are index scans used over seq scans?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: When are index scans used over seq scans?
Дата
Msg-id 16775.1114100611@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: When are index scans used over seq scans?  (Richard van den Berg <richard.vandenberg@trust-factory.com>)
Ответы Re: When are index scans used over seq scans?  (Richard van den Berg <richard.vandenberg@trust-factory.com>)
Список pgsql-performance
Richard van den Berg <richard.vandenberg@trust-factory.com> writes:
> Tom Lane wrote:
>> Perhaps you are incurring a datatype conversion cost?

> Not that I can tell.

No, apparently not.  Hmm ... timestamp_cmp_internal is just a couple of
isnan() checks and one or two floating-point compares.  Should be pretty
dang cheap.  Unless isnan() is ridiculously expensive on your hardware?
More likely there is some bottleneck that we are not thinking of.

Are the tables in question particularly wide (many columns)?

>> which leads me to question what exactly is happening in those
>> comparisons.

> Your guess is as good as mine (actually, yours is much better). I can
> put together a reproducable test case if you like..

I'm thinking it would be interesting to look at a gprof profile of the
nestloop case.  If you can rebuild with profiling and get one, that
would be fine, or you can make up a test case that shows the same slow
joining behavior.

            regards, tom lane

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

Предыдущее
От: Richard van den Berg
Дата:
Сообщение: Re: When are index scans used over seq scans?
Следующее
От: Bill Chandler
Дата:
Сообщение: Index bloat problem?