Received: from ant.utdt ([200.41.62.131]) by hub.org (8.9.3/8.9.3) with ESMTP id OAA45370 for ; Tue, 16 May 2000 14:04:31 -0400 (EDT) (envelope-from mig@utdt.edu) From: mig@utdt.edu Received: (from mig@localhost) by ant.utdt (8.8.7/8.8.7) id PAA21319; Tue, 16 May 2000 15:00:21 -0300 Date: Tue, 16 May 2000 15:00:21 -0300 Message-Id: <200005161800.PAA21319@ant.utdt> X-Authentication-Warning: ant.utdt: mig set sender to mig@utdt.edu using -f To: tgl@sss.pgh.pa.us CC: kyle@actarg.com, pgsql-sql@postgresql.org, merrill@actarg.com In-reply-to: <21654.958494988@sss.pgh.pa.us> (message from Tom Lane on Tue, 16 May 2000 12:36:28 -0400) Subject: Re: Index not used in functions in 7.0? References: <3921689A.B70CFAC8@actarg.com> <21401.958492203@sss.pgh.pa.us> <21654.958494988@sss.pgh.pa.us> X-Archive-Number: 200005/18 I am probably completely wrong, but at least it will be short ... Could it be that select sum(tquant) from mtr_reg where to_proj = $2 and pnum = $1 and (status = 'clsd' or status = 'open' or status = 'prip') ; makes it harder for the optimizer due to the ORs, and that select sum(tquant) from mtr_reg where to_proj = $2 and pnum = $1 and status in ('clsd','open','prip') --- last line changed ; would produce a better cost estimate? Miguel Sofer