Skip site navigation (1) Skip section navigation (2)

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
Message-ID: 5050.1111693395@sss.pgh.pa.us (view raw or flat)
Thread:
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

Responses

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group