Re: Customizing psql console to show execution times

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Customizing psql console to show execution times
Дата
Msg-id 685345.51817.qm@web31812.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Customizing psql console to show execution times  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
Ответы Re: Customizing psql console to show execution times  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
--- Phoenix Kiula <phoenix.kiula@gmail.com> wrote:

> In some examples posted to this forum, it seems to me that when people
> execute queries in the psql window, they also see "90 ms taken"
> (milliseconds), which denotes the time taken to execute the query.
> Where can I set this option because I'm not seeing it in my psql
> window on both Win XP and Linux. Thanks!

You can get the timing from psql two ways:

EXPLAIN ANALYZE your_query;

Or you can use of the psql internal commands to see the this of psql internal command type "\?"
from the psql command prompt.  The one you want is "\timing".  However, notice that "\timing" and
explain analyze do not exactly agree on the results they produce.

IIRC, "\time" also counts its own overhead.

Regards,
Richard Broersma Jr.

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

Предыдущее
От: Richard Broersma Jr
Дата:
Сообщение: Re: Yet Another COUNT(*)...WHERE...question
Следующее
От: "Phoenix Kiula"
Дата:
Сообщение: Re: Yet Another COUNT(*)...WHERE...question