From: | "Justin Graf" <justin(at)emproshunts(dot)com> |
---|---|
To: | "Peter Alban" <peter(dot)alban2(at)gmail(dot)com>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: same query in high number of times |
Date: | 2009-06-21 22:09:10 |
Message-ID: | 22091086315453@mail.emproshunts.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
---- Message from mailto:peter(dot)alban2(at)gmail(dot)com Peter Alban peter(dot)alban2(at)gmail(dot)com at 06-21-2009 10:59:49 PM ------
On Sun, Jun 21, 2009 at 10:01 PM, Justin Graf mailto:justin(at)emproshunts(dot)com wrote:
Peter Alban wrote:
duration: 2533.734 ms statement:
Limit (cost=4313.54..4313.55 rows=3 width=595) (actual time=288.525..288.528 rows=3 loops=1)
Because the query results are not cached only the RAW tables are. The query is rerun every time it is requested.
What is the group by clause accomplishing???
The sorting and hash Aggregate is eating up all the time
So this should mean that having say a 5 mb table in memory doing such query above takes 2 secs in memory ?
Assuming that, we probably have really slow memory :)
Besides , the query makes less sense to me , but I dont write the queries (yet) simply looking at the server side .
So do you suggest to tune the queries or shall I rather look for other monitoring tools ?
cheers,
Peter
Thats a really tiny table it should be processed in sub milliseconds something else is going on. The actual time in the explain of the query states 288 millisecond not the 2533.734 you state from above.
You have not told us the version of PG or the OS its running on.
Is there anything else running on the server???
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2009-06-22 03:23:33 | Re: same query in high number of times |
Previous Message | Scott Marlowe | 2009-06-21 22:06:41 | Re: same query in high number of times |