| От | Heikki Linnakangas |
|---|---|
| Тема | Re: How to profile an "SQL script"? |
| Дата | |
| Msg-id | 4936F03E.5040205@enterprisedb.com обсуждение исходный текст |
| Ответ на | Re: How to profile an "SQL script"? (Andreas Kretschmer <akretschmer@spamfence.net>) |
| Список | pgsql-performance |
Andreas Kretschmer wrote: > Kynn Jones <kynnjo@gmail.com> schrieb: > >> Hi. I have a longish collection of SQL statements stored in a file that I run >> periodically via cron. Running this "script" takes a bit too long, even for a >> cron job, and I would like to streamline it. >> >> Is there a way to tell Postgres to print out, after each SQL statement is >> executed, how long it took to execute? > > Do you run this with psql? You can switch on timing-output, with > \timing. It displays after each statement the run-time for this > statement. See also log_duration and log_min_duration settings. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера