From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Greg Sabino Mullane <greg(at)turnstep(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Timing a query |
Date: | 2001-11-27 17:50:43 |
Message-ID: | 200111271750.fARHohi27363@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> > This seems to be such a commonly needed task. Shouldn't this be
> > incorporated into psql?
>
> I still like my patch: it performs a little differently from the
> EXPLAIN ANALYZE function. You turn it on and off with the
> a "\m", and it records the time it takes everything to run,
> even things like index creation, which EXPLAIN ANALYZE does not
> handle. Plus, you don't have to go back and re-run the query
> if you want to time it: it simply presents the timing information
> after every query, until you turn the option off:
>
> template1=# SELECT count(*) FROM baz;
>
> count
> -------
> 15212
>
> TOTAL TIME: 0.004665
>
> template1=# CREATE INDEX foobar ON baz(waldo);
>
> CREATE
>
> TOTAL TIME: 0.011012
Yes, this does seem nice.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Lindner | 2001-11-27 17:56:21 | Re: 7.1.3 configure failure on Solaris 2.6 |
Previous Message | Rich Shepard | 2001-11-27 17:30:40 | Re: Postgres 7.1.3 RPMs for RedHat 6.2 ? |