Re: getting elapsed query times - Mailing list pgsql-general

From bricklen
Subject Re: getting elapsed query times
Date
Msg-id 33b743250901061245h7a3f0dg3bc745062e5ea14f@mail.gmail.com
Whole thread Raw
In response to Re: getting elapsed query times  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
On Sun, Jan 4, 2009 at 7:01 PM, Craig Ringer
<craig@postnewspapers.com.au> wrote:
> Alternately, rather than doing everything within PL/PgSQL, just do it from
> normal SQL, issued through psql. That way you can just use \timing .
>
> For simple one-liners, instead of:
>
> psql -d DB1 -c 'select execute_function_foo();'
>
> you can write:
>
> psql -d DB1 <<__END__
> \timing
> select execute_function_foo();
> __END__

Or just add \timing to your .psqlrc file for simplicity
eg.
$ cat ~postgres/.psqlrc
\timing

pgsql-general by date:

Previous
From: "Dan Armbrust"
Date:
Subject: Re: Slow Vacuum was: vacuum output question
Next
From: Alvaro Herrera
Date:
Subject: Re: Slow Vacuum was: vacuum output question