Re: query total time im milliseconds

From: Samuel Gendler <sgendler(at)ideasculptor(dot)com>
To: Radhya sahal <rad_cs_2006(at)yahoo(dot)com>
Cc: pgsql-performance group <pgsql-performance(at)postgresql(dot)org>
Subject: Re: query total time im milliseconds
Date: 2011-07-10 17:51:52
Message-ID: CAEV0TzCZVv2Ge0t6-hc3rb2H2WJye8GOmo1X1CeFMoYkQvkYhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Radhya sahal 2011-07-10 18:26:11 Fw: query total time im milliseconds
Previous Message Radhya sahal 2011-07-10 16:44:30 query total time im milliseconds