From: Mark Mielke <mark@mark.mielke.cc>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Combining two bitmap scans out performs a single regular index scan?
Date: Sat, 08 Dec 2007 17:07:25 -0500
Message-ID: <475B159D.8000203@mark.mielke.cc> (raw)
In-Reply-To: <15505.1197146779@sss.pgh.pa.us>
References: <475AD1E8.7000304@mark.mielke.cc>
<15505.1197146779@sss.pgh.pa.us>
Tom Lane wrote:
> Mark Mielke <mark@mark.mielke.cc> writes:
>
>> To find records after a certain time, I must do one of:
>> select * from icpric where audtdate > ? or (audtdate = ? and
>> audttime > ?)
>>
> In recent releases (at least 8.2, don't remember about 8.1), a row
> comparison is what you want:
>
> WHERE (auddate, adttime) > (?, ?)
>
Cool! That's the ticket. :-)
I guess it would be unnecessary to translate the other two queries into
this one for the purpose of planning, eh? :-)
Cheers,
mark
--
Mark Mielke <mark@mielke.cc>
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: mark@mark.mielke.cc, tgl@sss.pgh.pa.us
Subject: Re: Combining two bitmap scans out performs a single regular index scan?
In-Reply-To: <475B159D.8000203@mark.mielke.cc>
* 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