Postgresql equivalent of Python's timeit?

Albert-Jan Roskam sjeik_appie at hotmail.com
Fri Sep 15 11:42:06 EDT 2023


   Hi,
   This is more related to Postgresql than to Python, I hope this is ok.
   I want to measure Postgres queries N times, much like Python timeit
   (https://docs.python.org/3/library/timeit.html). I know about EXPLAIN
   ANALYZE and psql \timing, but there's quite a bit of variation in the
   times. Is there a timeit-like function in Postgresql?
   Thanks!
   Albert-Jan


More information about the Python-list mailing list