Re: The planner hates me.

From: "Jeff Amiel" <JAmiel(at)istreamimaging(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: The planner hates me.
Date: 2008-09-25 22:18:42
Message-ID: C17A452040EDB84AA7A10AEA334E3E1455D1CF@AD1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]

The Right Way (tm) to do this would be something like

create temp table dates as select * from get_dates(...);
analyze dates;
... original select, but join against temp table ...

which would leave the planner armed with some stats about the range
of dates of interest.

------------

I actually tried that but minus the analyze..... :(

Btw, congrats on whomever contributed to the bitmap scans (v8.1 I
believe)....the ability to use multiple indexes for a single table in
the same query is fantastic!!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Casey Allen Shobe 2008-09-25 23:38:18 Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)
Previous Message Greg Smith 2008-09-25 22:08:37 Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)