Re: ISNULL performance tweaks

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: ISNULL performance tweaks
Дата
Msg-id 200303061104.33335.josh@agliodbs.com
обсуждение исходный текст
Ответ на ISNULL performance tweaks  (Matt Mello <alien@spaceship.com>)
Список pgsql-performance
Matt,

> I recall seeing an email (I believe on this list) about how to improve
> performance of ISNULL's with some sort of tweak or trick.  However, I
> can't find that email anywhere, and couldn't find it searching the
> maillist archives.

Easy.  Create a partial index on NULLs:

CREATE INDEX idx_tablename_nulls ON tablename(columname)
WHERE columname IS NULL;

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Предыдущее
От: Matt Mello
Дата:
Сообщение: ISNULL performance tweaks
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: ISNULL performance tweaks