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(...);
... 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
pgsql-general by date
|Next:||From: Casey Allen Shobe||Date: 2008-09-25 23:38:18|
|Subject: Re: Obfuscated stored procedures (was Re: Oracle and Postgresql) |
|Previous:||From: Greg Smith||Date: 2008-09-25 22:08:37|
|Subject: Re: Obfuscated stored procedures (was Re: Oracle and