Re: Index not used in functions in 7.0?

Поиск
Список
Период
Сортировка
От mig@utdt.edu
Тема Re: Index not used in functions in 7.0?
Дата
Msg-id 200005161800.PAA21319@ant.utdt
обсуждение исходный текст
Ответ на Re: Index not used in functions in 7.0?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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



В списке pgsql-sql по дате отправления:

Предыдущее
От: Clayton Cottingham aka DrFrog
Дата:
Сообщение: doc links broken
Следующее
От: Kyle Bateman
Дата:
Сообщение: Re: Index not used in functions in 7.0?