Received: from dfw-ix13.ix.netcom.com (dfw-ix13.ix.netcom.com [206.214.98.13]) by hub.org (8.9.3/8.9.3) with ESMTP id SAA21539 for ; Mon, 18 Oct 1999 18:59:11 -0400 (EDT) (envelope-from drfrog@smartt.com) Received: (from smap@localhost) by dfw-ix13.ix.netcom.com (8.8.4/8.8.4) id RAA25771 for ; Mon, 18 Oct 1999 17:58:37 -0500 (CDT) Received: from unknown(207.230.254.117) by dfw-ix13.ix.netcom.com via smap (V1.3) id rma025755; Mon Oct 18 17:58:28 1999 Sender: clay@ix.netcom.com Message-ID: <380BA81F.7FCD7A0A@smartt.com> Date: Mon, 18 Oct 1999 16:07:11 -0700 From: Clayton Cottingham X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.12 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: indexes and or clause Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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