Re: Combining two bitmap scans out performs a single regular index scan?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Combining two bitmap scans out performs a single regular index scan?
Date: 2007-12-08 20:46:19
Message-ID: 15505.1197146779@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mark Mielke <mark(at)mark(dot)mielke(dot)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) > (?, ?)

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Mielke 2007-12-08 22:07:25 Re: Combining two bitmap scans out performs a single regular index scan?
Previous Message Mark Mielke 2007-12-08 17:18:32 Combining two bitmap scans out performs a single regular index scan?