pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Radhya sahal <rad_cs_2006@yahoo.com>
To: pgsql-performance group <pgsql-performance@postgresql.org>
Subject: Fw: query total time im milliseconds
Date: Sun, 10 Jul 2011 11:26:11 -0700 (PDT)
Message-ID: <1310322371.24647.YahooMailRC@web38604.mail.mud.yahoo.com> (raw)
In-Reply-To: <CAEV0TzCZVv2Ge0t6-hc3rb2H2WJye8GOmo1X1CeFMoYkQvkYhg@mail.gmail.com>
References: <1310298105.48876.YahooMailRC@web38605.mail.mud.yahoo.com>
	<CAEV0TzCZVv2Ge0t6-hc3rb2H2WJye8GOmo1X1CeFMoYkQvkYhg@mail.gmail.com>





----- Forwarded Message ----
From: Radhya sahal <rad_cs_2006@yahoo.com>
To: Samuel Gendler <sgendler@ideasculptor.com>
Sent: Sun, July 10, 2011 11:25:46 AM
Subject: Re: [PERFORM] 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@ideasculptor.com>
To: Radhya sahal <rad_cs_2006@yahoo.com>
Cc: pgsql-performance group <pgsql-performance@postgresql.org>
Sent: Sun, July 10, 2011 10:51:52 AM
Subject: Re: [PERFORM] query total time im milliseconds




On Sun, Jul 10, 2011 at 4:41 AM, Radhya sahal <rad_cs_2006@yahoo.com> 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; 


view thread (8+ messages)  latest in thread

Message-ID: <1310322371.24647.YahooMailRC@web38604.mail.mud.yahoo.com>
Permalink:  ../1310322371.24647.YahooMailRC@web38604.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/1310322371.24647.YahooMailRC@web38604.mail.mud.yahoo.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: rad_cs_2006@yahoo.com
  Subject: Re: Fw: query total time im milliseconds
  In-Reply-To: <1310322371.24647.YahooMailRC@web38604.mail.mud.yahoo.com>

* 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