Fw: query total time im milliseconds

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

 





----- Forwarded Message ----
From: Radhya sahal <rad_cs_2006@xxxxxxxxx>
To: Samuel Gendler <sgendler@xxxxxxxxxxxxxxxx>
Sent: Sun, July 10, 2011 11:25:46 AM
Subject: Re: query total time im milliseconds

Thank's

long startTime = System.currentTimeMillis();
//execute query
long executionTime = System.currentTimeMillis() - startTime;

this executionTime is not an actual time for query ,
it includes time for access to postgresql server
 using JDBC


From: Samuel Gendler <sgendler@xxxxxxxxxxxxxxxx>
To: Radhya sahal <rad_cs_2006@xxxxxxxxx>
Cc: pgsql-performance group <pgsql-performance@xxxxxxxxxxxxxx>
Sent: Sun, July 10, 2011 10:51:52 AM
Subject: Re: query total time im milliseconds



On Sun, Jul 10, 2011 at 4:41 AM, Radhya sahal <rad_cs_2006@xxxxxxxxx> wrote:
Dear all ,
could any one help me?
when i use pgadmin to exceute a query it shows the total time for query ..
such as
(select * form table_name.........)query total time is for example 100 ms
i want to know the command that can retentive the query total time in millisecond
if i connect with postgresql from java using JDBC
i need the query total time necessaryto use it in my project
i don't want run explian just query
thank's


long startTime = System.currentTimeMillis();
//execute query
long executionTime = System.currentTimeMillis() - startTime; 


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

  Powered by Linux