Re: Preventing query from hogging server - Mailing list pgsql-performance

From Tom Lane
Subject Re: Preventing query from hogging server
Date
Msg-id 5050.1111693395@sss.pgh.pa.us
Whole thread Raw
In response to Preventing query from hogging server  ("Matthew Nuzum" <matt.followers@gmail.com>)
Responses Re: Preventing query from hogging server  ("Matthew Nuzum" <matt.followers@gmail.com>)
Re: Preventing query from hogging server  ("Matthew Nuzum" <matt.followers@gmail.com>)
List pgsql-performance
"Matthew Nuzum" <matt.followers@gmail.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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_autovacuum not having enough suction ?
Next
From: "Matthew Nuzum"
Date:
Subject: Re: Preventing query from hogging server