Search Postgresql Archives

Re: query planner weirdness?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Bob Duffey" <bobduffey68@xxxxxxxxx> writes:
> 2008/6/28 Steve Atkins <steve@xxxxxxxxxxx>:
>> If you're iterating through the records with a cursor, the plan may
>> be different, IIRC - weighted to provide first row quickly, as opposed
>> to the query that was run that's weighted to provide last row quickly.
>> 
> I agree, and I was hoping that would be the case, but as it happens it
> wasn't.

The planner does in fact pay more attention to first-row cost than total
cost when given a DECLARE CURSOR instead of a regular SELECT.
Apparently that wasn't enough to make the indexscan be preferred,
though, which is a bit curious.  You might want to look at
effective_cache_size as well as random_page_cost.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux