Search Postgresql Archives

Re: getting elapsed query times

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

 



On Sun, Jan 4, 2009 at 7:01 PM, Craig Ringer
<craig@xxxxxxxxxxxxxxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux