Re: same query in high number of times

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




---- Message from Peter Alban <peter.alban2@xxxxxxxxx> at 06-21-2009 10:59:49 PM ------
On Sun, Jun 21, 2009 at 10:01 PM, Justin Graf <justin@xxxxxxxxxxxxxxx> 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???



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux