Skip site navigation (1) Skip section navigation (2)

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

From: David Jarvis <thangalin(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thom Brown <thombrown(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Optimize date query for large child tables: GiST or GIN?
Date: 2010-05-20 19:58:16
Message-ID: AANLkTikOEC-Gr3eqGlyGauRAZJknQEaS5DEWw-ZOcl6r@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
What if I were to have the application pass in two sets of date ranges?

For the condition of Dec 22 to Mar 22:

Dec 22 would become:

   - Dec 22 - Dec 31

Mar 22 would become:

   - Jan 1 - Mar 22

The first range would always be for the current year; the second range would
always be for the year following the current year.

Would that allow PostgreSQL to use the index?

Dave

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2010-05-20 20:03:54
Subject: Re: Optimize date query for large child tables: GiST or GIN?
Previous:From: Tom LaneDate: 2010-05-20 19:52:50
Subject: Re: Optimize date query for large child tables: GiST or GIN?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group