Sha256: 4bcbb1ca6fc9928e381d5e52972e63a391c5f94ee0566ae80a0bbbc684cb059f

Contents?: true

Size: 509 Bytes

Versions: 5

Compression:

Stored size: 509 Bytes

Contents

/* Queries that have highest frequency of execution */

SELECT query AS qry,
interval '1 millisecond' * total_exec_time AS exec_time,
to_char((total_exec_time/sum(total_exec_time) OVER()) * 100, 'FM90D0') || '%%'  AS prop_exec_time,
to_char(calls, 'FM999G999G990') AS ncalls,
interval '1 millisecond' * (shared_blk_read_time + shared_blk_write_time) AS sync_io_time
FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
ORDER BY calls DESC LIMIT %{limit};

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-pg-extras-5.4.5 lib/ruby_pg_extras/queries/calls_17.sql
ruby-pg-extras-5.4.4 lib/ruby_pg_extras/queries/calls_17.sql
ruby-pg-extras-5.4.3 lib/ruby_pg_extras/queries/calls_17.sql
ruby-pg-extras-5.4.2 lib/ruby_pg_extras/queries/calls_17.sql
ruby-pg-extras-5.4.1 lib/ruby_pg_extras/queries/calls_17.sql