Re: Sequence vs. Index Scan

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Sequence vs. Index Scan
Дата
Msg-id 20070507105829.GB30076@phlogiston.dyndns.org
обсуждение исходный текст
Ответ на Re: Sequence vs. Index Scan  ("Aaron Bono" <postgresql@aranya.com>)
Ответы Re: Sequence vs. Index Scan  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@crankycanuck.ca
This work was visionary and imaginative, and goes to show that visionary
and imaginative work need not end up well.     --Dennis Ritchie


В списке pgsql-sql по дате отправления:

Предыдущее
От: Phillip Smith
Дата:
Сообщение: Re: syntax error in "createdb"
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: How to use function PointN?