Re: very slow selects on a small table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian Cox <brian(dot)cox(at)ca(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: very slow selects on a small table
Date: 2009-06-17 23:16:47
Message-ID: 6269.1245280607@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Brian Cox <brian(dot)cox(at)ca(dot)com> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Brian Cox 2009-06-17 23:25:12 Re: very slow selects on a small table
Previous Message Brian Cox 2009-06-17 22:49:39 Re: very slow selects on a small table