From: mig@utdt.edu
To: tgl@sss.pgh.pa.us
Cc: kyle@actarg.com
Cc: pgsql-sql@postgresql.org
Cc: merrill@actarg.com
Subject: Re: Index not used in functions in 7.0?
Date: Tue, 16 May 2000 15:00:21 -0300
Message-ID: <200005161800.PAA21319@ant.utdt> (raw)
In-Reply-To: <21654.958494988@sss.pgh.pa.us>
References: <3921689A.B70CFAC8@actarg.com>
<21401.958492203@sss.pgh.pa.us>
<21654.958494988@sss.pgh.pa.us>
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
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: mig@utdt.edu, tgl@sss.pgh.pa.us, kyle@actarg.com, merrill@actarg.com
Subject: Re: Index not used in functions in 7.0?
In-Reply-To: <200005161800.PAA21319@ant.utdt>
References: <3921689A.B70CFAC8@actarg.com> <21401.958492203@sss.pgh.pa.us> <21654.958494988@sss.pgh.pa.us> <200005161800.PAA21319@ant.utdt>
* 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