From: Andrew Biagioni <andrew.biagioni@e-greek.net>
To: Postgres <pgsql-admin@postgresql.org>
To: shreedhar <shreedhar@lucidindia.net>
Subject: Re: How can I make note of time taken by each query to execute in Triggers
Date: Wed, 22 Jan 2003 23:50:48 -0500
Message-ID: <SO4WPJ848MHELILK2XTY71638793.3e2f74a8@Laptop> (raw)
In-Reply-To: <001001c2c296$babff360$1201a8c0@a4005>
One of the options you can specify in postgresql.conf, is to write to log the
amount of time of each query. That should give you the precision you need,
although of course you need to look at a log file and not at a DB table...
If you try this approach, I recommend you specify printing out the queries as
well, that will allow you to distinguish what is taking how long.
Andrew
1/22/03 11:20:15 PM, "shreedhar" <shreedhar@lucidindia.net> wrote:
>Hi All,
>I would like read time taken by each query in my triggers.
>so i created a temporary table and inserted timestamp before i start qurey
>and inserted again timestamp after completion of the query. But i am getting
>same time. How can I get the time taken by each query.
>
>Regards,
>Sreedhar
>"Faith, faith, faith in ourselves, faith, faith in God, this is the secret
>of greatness.
>If you have faith in all the three hundred and thirty millions of your
>mythological gods,
>and in all the gods which foreigners have now and again introduced into your
>midst,
>and still have no faith in yourselves, there is no salvation for you. "
>(III. 190)
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: andrew.biagioni@e-greek.net, shreedhar@lucidindia.net
Subject: Re: How can I make note of time taken by each query to execute in Triggers
In-Reply-To: <SO4WPJ848MHELILK2XTY71638793.3e2f74a8@Laptop>
References: <001001c2c296$babff360$1201a8c0@a4005> <SO4WPJ848MHELILK2XTY71638793.3e2f74a8@Laptop>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox