| From: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Sequence vs. Index Scan |
| Date: | 2007-05-07 10:58:29 |
| Message-ID: | 20070507105829.GB30076@phlogiston.dyndns.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Sun, May 06, 2007 at 01:45:54PM -0500, Aaron Bono wrote:
> Then I inserted 150 more records in the slow schema and pow - it started
> working like the fast schema.
>
> So my conclusion is that the function is being treated as volatile even
> though it is stable because the number of records is small.
I don't think that's the issue. If this is dependent on the
number of records, then for some reason the way the data is
structured means that the planner thinks a seqscan's a better bet.
This is probably due to distribution of the values. You could try
increasing the stats sample, and see if that helps.
A
--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
This work was visionary and imaginative, and goes to show that visionary
and imaginative work need not end up well.
--Dennis Ritchie
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Fuhr | 2007-05-07 13:13:43 | Re: How to use function PointN? |
| Previous Message | Phillip Smith | 2007-05-07 09:25:34 | Re: [SQL] syntax error in "createdb" |