Re: Optimize date query for large child tables: GiST or GIN? - Mailing list pgsql-performance

From David Jarvis
Subject Re: Optimize date query for large child tables: GiST or GIN?
Date
Msg-id AANLkTilettX5wMvbw_bmEfauXpOQUa3nwU2SaR_fwdwd@mail.gmail.com
Whole thread Raw
In response to Re: Optimize date query for large child tables: GiST or GIN?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: merge join killing performance
Next
From: Thom Brown
Date:
Subject: Re: Optimize date query for large child tables: GiST or GIN?