From: | Clayton Cottingham <drfrog(at)smartt(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | indexes and or clause |
Date: | 1999-10-18 23:07:11 |
Message-ID: | 380BA81F.7FCD7A0A@smartt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Ian L. Atkin | 1999-10-19 10:12:21 | subscribe |
Previous Message | Ian L. Atkin | 1999-10-18 20:26:44 | new to postgres!! Perl |