Re: When are index scans used over seq scans? - Mailing list pgsql-performance

From Tom Lane
Subject Re: When are index scans used over seq scans?
Date
Msg-id 16775.1114100611@sss.pgh.pa.us
Whole thread Raw
In response to Re: When are index scans used over seq scans?  (Richard van den Berg <richard.vandenberg@trust-factory.com>)
Responses Re: When are index scans used over seq scans?
List 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 by date:

Previous
From: Richard van den Berg
Date:
Subject: Re: When are index scans used over seq scans?
Next
From: Bill Chandler
Date:
Subject: Index bloat problem?