Re: very slow selects on a small table

От: Tom Lane
Тема: Re: very slow selects on a small table
Дата: ,
Msg-id: 7712.1245284255@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: very slow selects on a small table  (Brian Cox)
Список: pgsql-performance

Скрыть дерево обсуждения

very slow selects on a small table  (Brian Cox, )
 Re: very slow selects on a small table  (Tom Lane, )
 Re: very slow selects on a small table  (Brian Cox, )
  Re: very slow selects on a small table  (Tom Lane, )
 Re: very slow selects on a small table  (Brian Cox, )
  Re: very slow selects on a small table  (Tom Lane, )
 Re: very slow selects on a small table  (Brian Cox, )
  Re: very slow selects on a small table  (Tom Lane, )
 Re: very slow selects on a small table  (Brian Cox, )
  Re: very slow selects on a small table  (Tom Lane, )
 Re: very slow selects on a small table  (Brian Cox, )
  Re: very slow selects on a small table  (Grzegorz Jaśkiewicz, )
  Re: very slow selects on a small table  (Tom Lane, )
 Re: very slow selects on a small table  (Brian Cox, )
  Re: very slow selects on a small table  (Grzegorz Jaśkiewicz, )

Brian Cox <> writes:
> Tom Lane [] wrote:
>> OK, so what's the entry for column ts_id?

> Is this what you requested? Brian

Yup.  So according to those stats, all ts_id values fall in the range
600000000000000001 .. 600000000000250068.  It's no wonder it's not
expecting to find anything between 0 and 100000.  I think maybe you
forgot to re-analyze after loading data ... although this being 8.3,
I'd have expected autovacuum to update the stats at some point ...

Recommendation: re-ANALYZE, check that the plan changes to something
with a higher estimate for the number of rows for this table, and then
abort and restart those processes.  Lord knows how long you'll be
waiting for them to finish with their current plans :-(

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: very slow selects on a small table
От: Alberto Dalmaso
Дата:
Сообщение: Re: performance with query