Re: Preventing query from hogging server

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: matt(at)followers(dot)net
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Preventing query from hogging server
Date: 2005-03-24 19:43:15
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-performance

"Matthew Nuzum" <matt(dot)followers(at)gmail(dot)com> writes:
> Here is the query (BTW, there will be a corresponding "max" version of this
> query as well):
> INSERT INTO usage_sessions_min (accountid,atime,sessionid)
> select accountid, min(atime) as atime, sessionid from usage_access
> group by accountid,sessionid;

How many rows in usage_access? How many groups do you expect?
(Approximate answers are fine.) What PG version is this, and
what's your sort_mem setting?

regards, tom lane

In response to


Browse pgsql-performance by date

  From Date Subject
Next Message Reid Thompson 2005-03-24 19:46:41 Configuration/Tuning of server/DB
Previous Message Tom Lane 2005-03-24 19:32:59 Re: pg_autovacuum not having enough suction ?