Re: Timing a query

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Timing a query
Дата
Msg-id 200111271750.fARHohi27363@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Timing a query  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список 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@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

В списке pgsql-general по дате отправления:

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Postgres 7.1.3 RPMs for RedHat 6.2 ?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Supporting PostgreSQL infrastructure