indexes and or clause
От | Clayton Cottingham |
---|---|
Тема | indexes and or clause |
Дата | |
Msg-id | 380BA81F.7FCD7A0A@smartt.com обсуждение исходный текст |
Список | 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
В списке pgsql-sql по дате отправления: