Analyzing last run query in psql

From: Joe Van Dyk <joe(at)tanga(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Analyzing last run query in psql
Date: 2013-07-03 05:05:17
Message-ID: CACfv+pL9K=mTXGfLg_Y5C2-AkuzPp1rorVmXu-vYQRzLmaV8GA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I frequently need to analyze the last query in psql:
select * from table where id = 1;
explain analyze select * from table where id = 1;

It would be nice to be able to do this:
explain analyze $LAST

(or can I do something like that already?)

I'm not using psql interactively, I pipe files into psql (if it matters).

Joe

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2013-07-03 06:20:57 Re: Analyzing last run query in psql
Previous Message Alvaro Herrera 2013-07-02 17:17:58 Re: [GENERAL] Floating point error