Re: SQL CPU time usage

From: Ruben Rubio Rey <ruben(at)rentalia(dot)com>
To: john_oshea(at)wordbank(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: SQL CPU time usage
Date: 2006-05-18 14:52:23
Message-ID: 446C8A27.9030100@rentalia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

john_oshea(at)wordbank(dot)com wrote:

> On 17 May 2006, at 16:21, Ruben Rubio Rey wrote:
>
>> I have a web page, that executes several SQLs.
>>
>> So, I would like to know witch one of those SQLs consumes more CPU.
>> For example,
>> I have SQL1 that is executed in 1.2 secs and a SQL2 that is executed
>> in 200 ms.
>>
>> But SQL2 is executed 25 times and SQL1 is executed 1 time, so really
>> SQL2 consumes more CPU time.
>>
>> Is there any way to know this?
>> I have think that logging all SQLs and then cheking it is a way to
>> do it ... any other idea?
>
>
> Practical Query Analysis: <http://pqa.projects.postgresql.org/> does
> exactly that (scan historic logs). Very nice indeed and more than
> worth the money (it's BSD-licensed)
>
thanks

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Chris Mckenzie 2006-05-18 15:20:17 Re: Performance/Maintenance test result collection
Previous Message Tom Lane 2006-05-18 14:48:20 Re: Benchmarck PostgreSQL 8.1.4 MySQL 5.0.20 and Oracle 10g2