Re: Optimize date query for large child tables: GiST or GIN?

Поиск
Список
Период
Сортировка
От Matthew Wakeling
Тема Re: Optimize date query for large child tables: GiST or GIN?
Дата
Msg-id alpine.DEB.2.00.1005201355020.23334@aragorn.flymine.org
обсуждение исходный текст
Ответ на Optimize date query for large child tables: GiST or GIN?  (David Jarvis <thangalin@gmail.com>)
Ответы Re: Optimize date query for large child tables: GiST or GIN?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On Wed, 19 May 2010, David Jarvis wrote:
>      extract( YEAR FROM m.taken ) BETWEEN 1900 AND 2009 AND

That portion of the WHERE clause cannot use an index on m.taken. Postgres
does not look inside functions (like extract) to see if something
indexable is present. To get an index to work, you could create an index
on (extract(YEAR FROM m.taken)).

Matthew

--
 Here we go - the Fairy Godmother redundancy proof.
                                        -- Computer Science Lecturer

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: Optimize date query for large child tables: GiST or GIN?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Optimize date query for large child tables: GiST or GIN?