Use the pg_stat_statements extension