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

Поиск
Список
Период
Сортировка
От David Jarvis
Тема Re: Optimize date query for large child tables: GiST or GIN?
Дата
Msg-id AANLkTilettX5wMvbw_bmEfauXpOQUa3nwU2SaR_fwdwd@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Optimize date query for large child tables: GiST or GIN?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Hi,

I have posted an image of the user inputs here:


The problem is that I am given a range of days (Dec 22 - Mar 22) over a range of years (1900 - 2009) and the range of days can span from one year to the next. This is not the same as saying Dec 22, 1900 to Mar 22, 2009, for which I do not need date math.

What you really need to do is not do date arithmetic using text-string
operations.  The planner has no intelligence about that whatsoever.
Convert the operations to something natural using real date or timestamp
types, and then look at what indexes you need.

Any suggestions on how to go about this?

Thanks again!

Dave

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

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