in mysql
command line interface, when execute query tell how long query took execute after printing out results.
in postgres command line interface (psql
) not tell you. know how configure logging can information logs, more convenient have print standard output in mysql
.
can done?
use \timing
explained "how can time sql-queries using psql?".
see the manual psql
.
if want server-side execution times don't include time transfer result client, can set log_min_duration_statement = 0
in configuration, set client_min_messages = log
log info in console.
you can use explain analyze
detailed execution timings. there's timing overhead unless use explain (analyze true, timing false)
, in newer versions, , disables detailed timing give aggregate execution time instead.
pgbadger, when combined the auto_explain
module, can provide useful aggregate statistics log analysis.
finally, there's pg_stat_statements
, can collect handy aggregate information on running system.
Comments
Post a Comment