From: Clayton Cottingham <drfrog@smartt.com>
To: pgsql-sql@postgresql.org
Subject: indexes and or clause
Date: Mon, 18 Oct 1999 16:07:11 -0700
Message-ID: <380BA81F.7FCD7A0A@smartt.com> (raw)
hello
im having some problems gettin a select to use indexes when passin an or
arguement
SELECT
d.site_item_id,d.header,d.site_code,d.link,d.highest_bid_price,d.currency,
d.close_date,d.bid_quantity
FROM emarqet_kw a,emarqet_kw b, emarqet_kw c, emarqet_1_3 d WHERE
a.primary_id = b.primary_id and
d.primary_id = b.primary_id and (a.keyword='cent' AND
b.keyword='lincoln') limit 20,0 ;
works fine
but as soon as i change it to
SELECT
d.site_item_id,d.header,d.site_code,d.link,d.highest_bid_price,d.currency,
d.close_date,d.bid_quantity
FROM emarqet_kw a,emarqet_kw b, emarqet_kw c, emarqet_1_3 d WHERE
a.primary_id = b.primary_id and
d.primary_id = b.primary_id and (a.keyword='cent' OR
b.keyword='lincoln') limit 20,0 ;
it doesnt handle the index anymore
if i do a select union select type query all is fine
has anyone else experienced this/know what to do!?
thanks a big o bunch
btw this happens on both 6.5 and 6.5.2
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: drfrog@smartt.com
Subject: Re: indexes and or clause
In-Reply-To: <380BA81F.7FCD7A0A@smartt.com>
References: <380BA81F.7FCD7A0A@smartt.com>
* 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