pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Mielke <mark@mark.mielke.cc>
Cc: pgsql-performance@postgresql.org
Subject: Re: Combining two bitmap scans out performs a single regular index scan?
Date: Sat, 08 Dec 2007 15:46:19 -0500
Message-ID: <15505.1197146779@sss.pgh.pa.us> (raw)
In-Reply-To: <475AD1E8.7000304@mark.mielke.cc>
References: <475AD1E8.7000304@mark.mielke.cc>

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) > (?, ?)

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <15505.1197146779@sss.pgh.pa.us>
Permalink:  ../15505.1197146779@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15505.1197146779@sss.pgh.pa.us

 · 

reply

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, mark@mark.mielke.cc
  Subject: Re: Combining two bitmap scans out performs a single regular index scan?
  In-Reply-To: <15505.1197146779@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