Re: Timing a query
От | Greg Sabino Mullane |
---|---|
Тема | Re: Timing a query |
Дата | |
Msg-id | E168jiH-0002Jj-00@mclean.mail.mindspring.net обсуждение исходный текст |
Ответ на | Timing a query ("Elizabeth O'Neill" <elizabeth.oneill@abcmail.co.uk>) |
Ответы |
Re: Timing a query
|
Список | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Can someone tell me if there is a way of getting the time a > query has taken to run to display after the query results ( > where in gives the row count). If you have a recent version of Postgresql, you can do an EXPLAIN ANALYZE before the actual query: EXPLAIN ANALYZE SELECT (*) FROM mytable WHERE foo=12; Alteratively, I wrote a small patch for psql that tells you how long every query you run takes. It may not work on your version: please always state which version you are running when posting a question. If you want to use my patch and it does not work with your version, let me know and I'll tweak it so it does. http://www.gtsm.com/postgres/microtiming.patch Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200111271003 -----BEGIN PGP SIGNATURE----- Comment: http://www.gtsm.com/pgp.html iQA/AwUBPAOrcrybkGcUlkrIEQLjZQCfepfTDzVHkY3kO6j/po1FFRi4qVEAn1Ye Ih8pBO7jXx1lOTnp8ZoTD0oc =AU0N -----END PGP SIGNATURE-----
В списке pgsql-general по дате отправления: