From: | Anne Rosset <arosset(at)collab(dot)net> |
---|---|
To: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Poor performance on an aggregate query |
Date: | 2013-04-15 20:59:50 |
Message-ID: | 9A6B86D66BD3C2438AFACFA09354890F20A26DDE@EXCH01.sp.corp.collab.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hi all,
I have this simple query that has performance issue. I am assuming there is something wrong in our configuration. Can someone point me to the right direction? (our work_mem is set to 64MB)
srdb=> explain analyze 013-04-15 16:51:20,223 INFO [com.vasoftware.sf.server.common.querygenerator.Query] (http--127.0.0.1-8080-11) Query: [Id: 4652] [duration: 51999][debug sql] SELECT
psrdb(> MAX(length(discussion_post.id)) AS maxLength
psrdb(> FROM
psrdb(> discussion_post discussion_post^C
psrdb=> explain analyze SELECT
psrdb-> MAX(length(discussion_post.id)) AS maxLength
psrdb-> FROM
psrdb-> discussion_post discussion_post
psrdb-> ;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=10000043105.13..10000043105.14 rows=1 width=10) (actual time=52150.015..52150.015 rows=1 loops=1)
-> Seq Scan on discussion_post (cost=10000000000.00..10000041980.90 rows=449690 width=10) (actual time=0.006..51981.746 rows=449604 loops=1)
Total runtime: 52150.073 ms
(3 rows)
Thanks a lot,
Anne
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2013-04-15 21:04:43 | Re: Poor performance on an aggregate query |
Previous Message | Jeff Janes | 2013-04-15 20:16:17 | Re: INDEX Performance Issue |