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

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

I think what you're essentially describing here is removing the OR from
the query in favor of issuing two queries and then combining the results
in the app.  Yeah, you could do that, but one would hope that it isn't
faster ;-)

            regards, tom lane

pgsql-performance by date:

Previous
From: David Jarvis
Date:
Subject: Re: Optimize date query for large child tables: GiST or GIN?
Next
From: David Jarvis
Date:
Subject: Re: Optimize date query for large child tables: GiST or GIN?