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 | [EMAIL PROTECTED] This work was visionary and imaginative, and goes to show that visionary and imaginative work need not end up well. --Dennis Ritchie ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org