Re: Should the optimiser convert a CASE into a WHERE if it can?

Поиск
Список
Период
Сортировка
От Matthew Wakeling
Тема Re: Should the optimiser convert a CASE into a WHERE if it can?
Дата
Msg-id alpine.DEB.2.00.1001271659000.6195@aragorn.flymine.org
обсуждение исходный текст
Ответ на Re: Should the optimiser convert a CASE into a WHERE if it can?  (Віталій Тимчишин <tivv00@gmail.com>)
Ответы Re: Should the optimiser convert a CASE into a WHERE if it can?  (Віталій Тимчишин <tivv00@gmail.com>)
Список pgsql-performance
On Wed, 27 Jan 2010, Віталій Тимчишин wrote:
> How  about SELECT SUM (case when id > 1200000 and id < 1210000 then 1 end)
> from tbl_tracker;

That is very interesting.

> * All the functions should be noop for null input

Alas, not true for COUNT(*), AVG(), etc.

Matthew

--
 An optimist sees the glass as half full, a pessimist as half empty,
 and an engineer as having redundant storage capacity.

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

Предыдущее
От: Віталій Тимчишин
Дата:
Сообщение: Re: Should the optimiser convert a CASE into a WHERE if it can?
Следующее
От: Віталій Тимчишин
Дата:
Сообщение: Re: Should the optimiser convert a CASE into a WHERE if it can?