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

Re: Preventing query from hogging server

From: "Matthew Nuzum" <matt(dot)followers(at)gmail(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Preventing query from hogging server
Date: 2005-03-24 19:55:32
Message-ID: 42431b39.16b65c96.1b4b.ffffd9b6@mx.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
> How many rows in usage_access?

Oh, I just got my explain analyze:
                                                                      QUERY
PLAN                                                             
----------------------------------------------------------------------------
--------------------------------------------------------------------------
 Subquery Scan "*SELECT*"  (cost=9499707.90..9856491.74 rows=3567838
width=28) (actual time=11443537.58..12470835.17 rows=1198141 loops=1)
   ->  Aggregate  (cost=9499707.90..9856491.74 rows=3567838 width=28)
(actual time=11443537.56..12466550.25 rows=1198141 loops=1)
         ->  Group  (cost=9499707.90..9767295.78 rows=35678384 width=28)
(actual time=11443537.10..12408372.26 rows=35678383 loops=1)
               ->  Sort  (cost=9499707.90..9588903.86 rows=35678384
width=28) (actual time=11443537.07..12035366.31 rows=35678383 loops=1)
                     Sort Key: accountid, sessionid
                     ->  Seq Scan on usage_access  (cost=0.00..1018901.84
rows=35678384 width=28) (actual time=8.13..416580.35 rows=35678383 loops=1)
 Total runtime: 12625498.84 msec
(7 rows)

-- 
Matthew Nuzum <matt(at)followers(dot)net>
www.followers.net - Makers of "Elite Content Management System"
View samples of Elite CMS in action by visiting
http://www.followers.net/portfolio/


In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2005-03-24 20:02:15
Subject: Re: Preventing query from hogging server
Previous:From: Matthew NuzumDate: 2005-03-24 19:53:37
Subject: Re: Preventing query from hogging server

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