Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 482AC9FB2A3 for ; Tue, 6 Mar 2007 09:48:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 52083-03 for ; Tue, 6 Mar 2007 09:48:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from interscan.indicator.com (mail.indicator.be [193.121.199.3]) by postgresql.org (Postfix) with ESMTP id 132359FBA84 for ; Tue, 6 Mar 2007 09:45:14 -0400 (AST) Received: from webaccess.indicator.be ([10.100.1.7]) by interscan.indicator.com with InterScan Message Security Suite; Tue, 06 Mar 2007 14:32:39 +0100 Received: from DOMEXT-MTA by webaccess.indicator.bewith Novell_GroupWise; Tue, 06 Mar 2007 14:45:12 +0100 Message-Id: <45ED7E6D.A3DD.0030.0@indicator.be> X-Mailer: Novell GroupWise Internet Agent 7.0.1 Date: Tue, 06 Mar 2007 14:45:01 +0100 From: "Bart Degryse" To: "PostgreSQL" Cc: "Ezequias Rodrigues da Rocha" Subject: Re: Time of executed query References: <55c095e90703060520s3e4a1feej65f56cee46fd6700@mail.gmail.com><45 ED7A0A.A3DD.0030.0@indicator.be><55c095e90703060537q5f620430wbac3d3a8197673 f4@mail.gmail.com> In-Reply-To: <55c095e90703060537q5f620430wbac3d3a8197673f4@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__PartFDD9584D.1__=" X-imss-version: 2.046 X-imss-result: Passed X-imss-approveListMatch: *@indicator.be X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.361 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO, HTML_MESSAGE, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200703/33 X-Sequence-Number: 27671 --=__PartFDD9584D.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Assuming you're using stored procedures... Start procedure with logging current time, name of procedure,... Perform whatever must be performed End procedure with logging current time, name of procedure,... Query logging table to get time spent =20 Alternative, still assuming you're using stored procedures... Start procedure with noting current time, name of procedure,... Perform whatever must be performed End procedure with logging current time - start time, name of procedure,...= Query logging table to get time spent >>> "Ezequias Rodrigues da Rocha" 2007-03-06 = 14:37 >>> I preffer that the database give me this information. I don't know if it is possible becouse if we retrieve many rows and if we want to put this result in a new column the same time will be replicated many times and consuming more processing. Any other suggestion ? Ezequias 2007/3/6, Bart Degryse : > > > note the time just before your operation starts > note the time just after it ends > show timeafter - timebefore > > >>> "Ezequias Rodrigues da Rocha" 2007-03-06 > 14:20 >>> > > Hi list, > > It is possible to retrieve the time of a SQL statement leads to > execute ? I would like to put in my application how much time each > operation leads to finish. > > Any suggestion ? > > -- > Ezequias Rodrigues da Rocha > http://ezequiasrocha.blogspot.com/=20 > use Mozilla Firefox:http://br.mozdev.org/firefox/ > > ---------------------------(end of > broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > --=20 Ezequias Rodrigues da Rocha http://ezequiasrocha.blogspot.com/=20 use Mozilla Firefox:http://br.mozdev.org/firefox/ --=__PartFDD9584D.1__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Description: HTML
Assuming you're using stored procedures...
Start procedure with logging current time, name of procedure,...<= /DIV>
Perform whatever must be performed
End procedure with logging current time, name of procedure,...
Query logging table to get time spent
 
Alternative, still assuming you're using stored procedures...
Start procedure with noting current time, name of procedure,...
Perform whatever must be performed
End procedure with logging current time - start time, name of = procedure,...
Query logging table to get time spent


>>> = "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-06 = 14:37 >>>
I preffer that the database give me this information.= I don't know if
it is possible becouse if we retrieve many rows and if = we want to put
this result in a new column the same time will be = replicated many
times and consuming more processing.

Any other = suggestion ?
Ezequias

2007/3/6, Bart Degryse <Bart.Degryse@ind= icator.be>:
>
>
> note the time just before your = operation starts
> note the time just after it ends
> show = timeafter - timebefore
>
> >>> "Ezequias Rodrigues da = Rocha" <ezequias.rocha@gmail.com> 2007-03-06
> 14:20 >>&g= t;
>
> Hi list,
>
> It is possible to retrieve the = time of a SQL statement leads to
> execute ? I would like to put in = my application how much time each
> operation leads to finish.
>= ;
> Any suggestion ?
>
> --
> Ezequias Rodrigues = da Rocha
> http://ezeq= uiasrocha.blogspot.com/
> use Mozilla Firefox:http://br.mozdev.or= g/firefox/
>
> ---------------------------(end of
> = broadcast)---------------------------
> TIP 5: don't forget to = increase your free space map settings
>


--
Ezequias = Rodrigues da Rocha
http:/= /ezequiasrocha.blogspot.com/
use Mozilla Firefox:http://br.mozdev.or= g/firefox/
--=__PartFDD9584D.1__=--