Re: show time consumed by query in psql

From: Richard Huxton <dev(at)archonet(dot)com>
To: Willy-Bas Loos <willybas(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: show time consumed by query in psql
Date: 2008-02-13 10:28:41
Message-ID: 47B2C659.3080605@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Willy-Bas Loos wrote:
> Hi,
>
> I´m on a slow internet connection, but i want to optimize a view on a
> server. I have console access, so psql seems the right way - pgAdmin from
> the client is just way biassed.
> How can i make psql report the amount of time that was consumed in the
> query??
> I´ve seen a couple of posts that refer to this, but everyone seems to solve
> it in some other way. Is this not a feature of psql? (it should be!)

\timing
SELECT * FROM my_table;

Of course, if you want the plan you'll need EXPLAIN ANALYSE

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Giorgio Valoti 2008-02-13 11:27:00 8.3 and uuid: unable to run uuid-ossp.sql
Previous Message A. Kretschmer 2008-02-13 10:28:17 Re: show time consumed by query in psql