Re: very slow selects on a small table

От: Tom Lane
Тема: Re: very slow selects on a small table
Дата: ,
Msg-id: 6269.1245280607@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:
> Here's the explain and a current strace and lsof. The strace shows even
> less I/O activity.

> cemdb=# explain select * from ts_stats_transetgroup_user_daily a where
> a.ts_id in (select b.ts_id from ts_stats_transetgroup_user_daily
> b,ts_stats_transet_user_interval c, ts_transetgroup_transets_map m where
> b.ts_transet_group_id = m.ts_transet_group_id and
> m.ts_transet_incarnation_id = c.ts_transet_incarnation_id and
> c.ts_user_incarnation_id = b.ts_user_incarnation_id and
> c.ts_interval_start_time >= '2009-6-16 01:00' and
> c.ts_interval_start_time < '2009-6-16 02:00');

Um, are you sure that is the query that PID 7397 is running?  It doesn't
match your previous pg_stat_activity printout, nor do I see anything
about partitioning by PKs.

            regards, tom lane


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

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