From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard van den Berg <richard.vandenberg@trust-factory.com>
Cc: pgsql-perform <pgsql-performance@postgresql.org>
Subject: Re: When are index scans used over seq scans?
Date: Thu, 21 Apr 2005 12:23:31 -0400
Message-ID: <16775.1114100611@sss.pgh.pa.us> (raw)
In-Reply-To: <4267D1ED.7010606@trust-factory.com>
References: <426665A0.1080102@trust-factory.com>
<26710.1114007961@sss.pgh.pa.us>
<4267612C.10803@trust-factory.com>
<15074.1114093502@sss.pgh.pa.us>
<4267D1ED.7010606@trust-factory.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, richard.vandenberg@trust-factory.com
Subject: Re: When are index scans used over seq scans?
In-Reply-To: <16775.1114100611@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox