From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | vamsi krishna <vamsikrishna1902(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Measuring execution time |
Date: | 2010-08-10 13:11:48 |
Message-ID: | AANLkTimfWaaVMi=eqWbkf2NKbjiQLOgazcw43L9PsBEE@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Tue, Aug 10, 2010 at 3:46 AM, vamsi krishna
<vamsikrishna1902(at)gmail(dot)com> wrote:
> I want to measure the execution time spent running an SQL select query after
> the plan generation.
>
> So precisely I want to put my start timer before createQueryDesc() or
> ExecutorStart() and end timer after freeQueryDesc() or ExecutorEnd().
>
> Right now I did so in "spi.c", "explain.c", "pquery.c" but they are not the
> default execution cases. Can someone tell me which file holds the default
> call to ExecutorStart(), because I also want to see the select query result
> unlike in the case of "explain" ?
Well, you should be able to find all the calls to ExecutorStart() by
using grep. But it sounds like you might be better off implementing
this as an executor hook. Or perhaps one of the existing ones
(auto_explain or pg_stat_statements) would give you what you need.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | William Wei | 2010-08-10 15:11:57 | BUG #5610: Extremely slow bulk insert performance |
Previous Message | vamsi krishna | 2010-08-10 07:46:02 | Measuring execution time |
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitriy Igrishin | 2010-08-10 13:35:12 | libpq |
Previous Message | Kevin Grittner | 2010-08-10 12:32:38 | Re: host name support in pg_hba.conf |