| От | Tom Lane |
|---|---|
| Тема | Re: Customizing psql console to show execution times |
| Дата | |
| Msg-id | 6088.1187193300@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Customizing psql console to show execution times (Richard Broersma Jr <rabroersma@yahoo.com>) |
| Список | pgsql-general |
Richard Broersma Jr <rabroersma@yahoo.com> writes:
> However, notice that "\timing" and
> explain analyze do not exactly agree on the results they produce.
\timing reports the total elapsed time as seen at the client. EXPLAIN
ANALYZE tells you about the query execution path inside the server; so
it omits the costs of parsing, planning, and network data transmission.
EXPLAIN ANALYZE also has much higher measurement overhead (typically 2
gettimeofday() calls per row, rather than 2 per query as for \timing).
So it's not unheard of for E.A. to report a number *larger* than the
actual execution time, especially on cheap PC hardware which tends to
have dog-slow gettimeofday().
They're both useful, but you have to keep in mind what you're measuring
and for what purpose.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера