pg-stats 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f0b03f1555456bb9186044dd2e591d03905c61a3861dec3852a7aeb2778625d
4
- data.tar.gz: 11bc08a05d97bc1c75e2486d4e5768f6e5a50022e927c9102e889d7dbeaeccd9
3
+ metadata.gz: 9e621fc8e0c48634775ea2900f893961830848e582a027713de9fb50dbc109da
4
+ data.tar.gz: 9c10943edee1b52e1ea39e51be577e51c8114e41495b3ad09024426f0500134c
5
5
  SHA512:
6
- metadata.gz: b1d30f8938922f6a7a31cb3c703bbd0348b3b7b0a38f591ab1c3483901c7a1fb194464b467d32806468012ba0625fbe72416225022be034af9e22908033a25da
7
- data.tar.gz: db963d167755e828781bf57cffa49a6a13943899000ff4c2ea9bd671c079f92d9424f017d3e2c4935324ec5f676a7cafc4770fd97f08212a5366880e4a08c1d4
6
+ metadata.gz: 8586306450c8f4efdc01bd19bdd9ca4d057310e4f20928c7da66e35c721e656e9284ee5b958b902d94d2fff05cc6c866ddb2756b57bc42d806a592579fc9885d
7
+ data.tar.gz: 9675a5a7d7332a7a43d06ac35d8f1f347b5e22362609c995203a89a404ada143b449bb2e7e346de82f4346c377645badacff6896f6d7c2230a3f05e0aeaf5238
@@ -1,63 +1,122 @@
1
1
  /* Table and index bloat in your database ordered by most wasteful */
2
2
 
3
- WITH constants AS (
4
- SELECT current_setting('block_size')::numeric AS bs, 23 AS hdr, 4 AS ma
5
- ), bloat_info AS (
6
- SELECT
7
- ma,bs,schemaname,tablename,
8
- (datawidth+(hdr+ma-(case when hdr%ma=0 THEN ma ELSE hdr%ma END)))::numeric AS datahdr,
9
- (maxfracsum*(nullhdr+ma-(case when nullhdr%ma=0 THEN ma ELSE nullhdr%ma END))) AS nullhdr2
10
- FROM (
3
+ WITH
4
+ constants AS (
11
5
  SELECT
12
- schemaname, tablename, hdr, ma, bs,
13
- SUM((1-null_frac)*avg_width) AS datawidth,
14
- MAX(null_frac) AS maxfracsum,
15
- hdr+(
16
- SELECT 1+count(*)/8
17
- FROM pg_stats s2
18
- WHERE null_frac<>0 AND s2.schemaname = s.schemaname AND s2.tablename = s.tablename
19
- ) AS nullhdr
20
- FROM pg_stats s, constants
21
- GROUP BY 1,2,3,4,5
22
- ) AS foo
23
- ), table_bloat AS (
24
- SELECT
25
- schemaname, tablename, cc.relpages, bs,
26
- CEIL((cc.reltuples*((datahdr+ma-
27
- (CASE WHEN datahdr%ma=0 THEN ma ELSE datahdr%ma END))+nullhdr2+4))/(bs-20::float)) AS otta
28
- FROM bloat_info
29
- JOIN pg_class cc ON cc.relname = bloat_info.tablename
30
- JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname = bloat_info.schemaname AND nn.nspname <> 'information_schema'
31
- ), index_bloat AS (
6
+ current_setting('block_size')::numeric AS bs,
7
+ 23 AS hdr,
8
+ 4 AS ma
9
+ ),
10
+ bloat_info AS (
11
+ SELECT
12
+ ma,
13
+ bs,
14
+ schemaname,
15
+ tablename,
16
+ (datawidth+(hdr+ma-(case when hdr%ma=0 THEN ma ELSE hdr%ma END)))::numeric AS datahdr,
17
+ (maxfracsum*(nullhdr+ma-(case when nullhdr%ma=0 THEN ma ELSE nullhdr%ma END))) AS nullhdr2
18
+ FROM (
19
+ SELECT
20
+ schemaname,
21
+ tablename,
22
+ hdr,
23
+ ma,
24
+ bs,
25
+ SUM((1-null_frac)*avg_width) AS datawidth,
26
+ MAX(null_frac) AS maxfracsum,
27
+ hdr+(
28
+ SELECT
29
+ 1+count(*)/8
30
+ FROM
31
+ pg_stats s2
32
+ WHERE
33
+ null_frac<>0 AND
34
+ s2.schemaname = s.schemaname AND
35
+ s2.tablename = s.tablename
36
+ ) AS nullhdr
37
+ FROM
38
+ pg_stats s,
39
+ constants
40
+ GROUP BY
41
+ 1,
42
+ 2,
43
+ 3,
44
+ 4,
45
+ 5
46
+ ) AS foo
47
+ ),
48
+ table_bloat AS (
49
+ SELECT
50
+ schemaname,
51
+ tablename,
52
+ cc.relpages,
53
+ bs,
54
+ CEIL((cc.reltuples*((datahdr+ma-
55
+ (CASE WHEN datahdr%ma=0 THEN ma ELSE datahdr%ma END))+nullhdr2+4))/(bs-20::float)) AS otta
56
+ FROM
57
+ bloat_info
58
+ JOIN
59
+ pg_class cc ON
60
+ cc.relname = bloat_info.tablename
61
+ JOIN
62
+ pg_namespace nn ON
63
+ cc.relnamespace = nn.oid AND
64
+ nn.nspname = bloat_info.schemaname AND
65
+ nn.nspname <> 'information_schema'
66
+ ),
67
+ index_bloat AS (
68
+ SELECT
69
+ schemaname,
70
+ tablename,
71
+ bs,
72
+ COALESCE(c2.relname,'?') AS iname,
73
+ COALESCE(c2.reltuples,0) AS ituples,
74
+ COALESCE(c2.relpages,0) AS ipages,
75
+ COALESCE(CEIL((c2.reltuples*(datahdr-12))/(bs-20::float)),0) AS iotta -- very rough approximation, assumes all cols
76
+ FROM
77
+ bloat_info
78
+ JOIN
79
+ pg_class cc
80
+ ON cc.relname = bloat_info.tablename
81
+ JOIN
82
+ pg_namespace nn ON
83
+ cc.relnamespace = nn.oid AND
84
+ nn.nspname = bloat_info.schemaname AND
85
+ nn.nspname <> 'information_schema'
86
+ JOIN
87
+ pg_index i ON
88
+ indrelid = cc.oid
89
+ JOIN
90
+ pg_class c2 ON
91
+ c2.oid = i.indexrelid
92
+ )
93
+
32
94
  SELECT
33
- schemaname, tablename, bs,
34
- COALESCE(c2.relname,'?') AS iname, COALESCE(c2.reltuples,0) AS ituples, COALESCE(c2.relpages,0) AS ipages,
35
- COALESCE(CEIL((c2.reltuples*(datahdr-12))/(bs-20::float)),0) AS iotta -- very rough approximation, assumes all cols
36
- FROM bloat_info
37
- JOIN pg_class cc ON cc.relname = bloat_info.tablename
38
- JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname = bloat_info.schemaname AND nn.nspname <> 'information_schema'
39
- JOIN pg_index i ON indrelid = cc.oid
40
- JOIN pg_class c2 ON c2.oid = i.indexrelid
41
- )
42
- SELECT
43
- type, schemaname, object_name, bloat, pg_size_pretty(raw_waste) as waste
44
- FROM
45
- (SELECT
46
- 'table' as type,
47
- schemaname,
48
- tablename as object_name,
49
- ROUND(CASE WHEN otta=0 THEN 0.0 ELSE table_bloat.relpages/otta::numeric END,1) AS bloat,
50
- CASE WHEN relpages < otta THEN '0' ELSE (bs*(table_bloat.relpages-otta)::bigint)::bigint END AS raw_waste
51
- FROM
52
- table_bloat
53
- UNION
54
- SELECT
55
- 'index' as type,
56
- schemaname,
57
- tablename || '::' || iname as object_name,
58
- ROUND(CASE WHEN iotta=0 OR ipages=0 THEN 0.0 ELSE ipages/iotta::numeric END,1) AS bloat,
59
- CASE WHEN ipages < iotta THEN '0' ELSE (bs*(ipages-iotta))::bigint END AS raw_waste
60
- FROM
61
- index_bloat) bloat_summary
62
- ORDER BY raw_waste DESC, bloat DESC;
95
+ type,
96
+ schemaname,
97
+ object_name,
98
+ bloat,
99
+ pg_size_pretty(raw_waste) as waste
100
+ FROM
101
+ (
102
+ SELECT
103
+ 'table' as type,
104
+ schemaname,
105
+ tablename as object_name,
106
+ ROUND(CASE WHEN otta=0 THEN 0.0 ELSE table_bloat.relpages/otta::numeric END,1) AS bloat,
107
+ CASE WHEN relpages < otta THEN '0' ELSE (bs*(table_bloat.relpages-otta)::bigint)::bigint END AS raw_waste
108
+ FROM
109
+ table_bloat
110
+ UNION SELECT
111
+ 'index' as type,
112
+ schemaname,
113
+ tablename || '::' || iname as object_name,
114
+ ROUND(CASE WHEN iotta=0 OR ipages=0 THEN 0.0 ELSE ipages/iotta::numeric END,1) AS bloat,
115
+ CASE WHEN ipages < iotta THEN '0' ELSE (bs*(ipages-iotta))::bigint END AS raw_waste
116
+ FROM
117
+ index_bloat
118
+ ) bloat_summary
119
+ ORDER BY
120
+ raw_waste DESC,
121
+ bloat DESC;
63
122
 
@@ -1,16 +1,23 @@
1
1
  /* Queries holding locks which other queries are waiting to be released */
2
2
 
3
- SELECT bl.pid AS blocked_pid,
3
+ SELECT
4
+ bl.pid AS blocked_pid,
4
5
  ka.query AS blocking_statement,
5
6
  now() - ka.query_start AS blocking_duration,
6
7
  kl.pid AS blocking_pid,
7
8
  a.query AS blocked_statement,
8
9
  now() - a.query_start AS blocked_duration
9
- FROM pg_catalog.pg_locks bl
10
- JOIN pg_catalog.pg_stat_activity a
11
- ON bl.pid = a.pid
12
- JOIN pg_catalog.pg_locks kl
13
- JOIN pg_catalog.pg_stat_activity ka
14
- ON kl.pid = ka.pid
15
- ON bl.transactionid = kl.transactionid AND bl.pid != kl.pid
16
- WHERE NOT bl.granted;
10
+ FROM
11
+ pg_catalog.pg_locks bl
12
+ JOIN
13
+ pg_catalog.pg_stat_activity a ON
14
+ bl.pid = a.pid
15
+ JOIN
16
+ pg_catalog.pg_locks kl
17
+ JOIN
18
+ pg_catalog.pg_stat_activity ka ON
19
+ kl.pid = ka.pid ON
20
+ bl.transactionid = kl.transactionid AND
21
+ bl.pid != kl.pid
22
+ WHERE
23
+ NOT bl.granted;
@@ -3,9 +3,10 @@
3
3
  SELECT
4
4
  'index hit rate' AS name,
5
5
  (sum(idx_blks_hit)) / nullif(sum(idx_blks_hit + idx_blks_read),0) AS ratio
6
- FROM pg_statio_user_indexes
7
- UNION ALL
8
- SELECT
6
+ FROM
7
+ pg_statio_user_indexes
8
+ UNION ALL SELECT
9
9
  'table hit rate' AS name,
10
10
  sum(heap_blks_hit) / nullif(sum(heap_blks_hit) + sum(heap_blks_read),0) AS ratio
11
- FROM pg_statio_user_tables;
11
+ FROM
12
+ pg_statio_user_tables;
@@ -1,4 +1,10 @@
1
1
  /* Available and installed extensions */
2
2
 
3
- SELECT * FROM pg_available_extensions ORDER BY name, installed_version;
3
+ SELECT
4
+ *
5
+ FROM
6
+ pg_available_extensions
7
+ ORDER BY
8
+ name,
9
+ installed_version;
4
10
 
@@ -1,11 +1,18 @@
1
1
  /* The size of indexes, descending by size */
2
2
 
3
- SELECT c.relname AS name,
3
+ SELECT
4
+ c.relname AS name,
4
5
  pg_size_pretty(sum(c.relpages::bigint*8192)::bigint) AS size
5
- FROM pg_class c
6
- LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
7
- WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')
8
- AND n.nspname !~ '^pg_toast'
9
- AND c.relkind='i'
10
- GROUP BY c.relname
11
- ORDER BY sum(c.relpages) DESC;
6
+ FROM
7
+ pg_class c
8
+ LEFT JOIN
9
+ pg_namespace n ON
10
+ (n.oid = c.relnamespace)
11
+ WHERE
12
+ n.nspname NOT IN ('pg_catalog', 'information_schema') AND
13
+ n.nspname !~ '^pg_toast' AND
14
+ c.relkind='i'
15
+ GROUP BY
16
+ c.relname
17
+ ORDER BY
18
+ sum(c.relpages) DESC;
@@ -1,11 +1,12 @@
1
1
  /* Index hit rate (effective databases are at 99% and up) */
2
2
 
3
- SELECT relname,
4
- CASE idx_scan
5
- WHEN 0 THEN 'Insufficient data'
6
- ELSE (100 * idx_scan / (seq_scan + idx_scan))::text
7
- END percent_of_times_index_used,
8
- n_live_tup rows_in_table
3
+ SELECT
4
+ relname,
5
+ CASE idx_scan
6
+ WHEN 0 THEN 'Insufficient data'
7
+ ELSE (100 * idx_scan / (seq_scan + idx_scan))::text
8
+ END percent_of_times_index_used,
9
+ n_live_tup rows_in_table
9
10
  FROM
10
11
  pg_stat_user_tables
11
12
  ORDER BY
@@ -8,9 +8,13 @@ SELECT
8
8
  pg_locks.mode,
9
9
  pg_stat_activity.query AS query_snippet,
10
10
  age(now(),pg_stat_activity.query_start) AS "age"
11
- FROM pg_stat_activity,pg_locks left
12
- OUTER JOIN pg_class
13
- ON (pg_locks.relation = pg_class.oid)
14
- WHERE pg_stat_activity.query <> '<insufficient privilege>'
15
- AND pg_locks.pid = pg_stat_activity.pid
16
- AND pg_stat_activity.pid <> pg_backend_pid() order by query_start;
11
+ FROM
12
+ pg_stat_activity,
13
+ pg_locks
14
+ LEFT OUTER JOIN
15
+ pg_class ON
16
+ (pg_locks.relation = pg_class.oid)
17
+ WHERE
18
+ pg_stat_activity.query <> '<insufficient privilege>' AND
19
+ pg_locks.pid = pg_stat_activity.pid AND
20
+ pg_stat_activity.pid <> pg_backend_pid() order by query_start;
@@ -7,8 +7,8 @@ SELECT
7
7
  FROM
8
8
  pg_stat_activity
9
9
  WHERE
10
- pg_stat_activity.query <> ''::text
11
- AND state <> 'idle'
12
- AND now() - pg_stat_activity.query_start > interval '1 minute'
10
+ pg_stat_activity.query <> ''::text AND
11
+ state <> 'idle' AND
12
+ now() - pg_stat_activity.query_start > interval '1 minute'
13
13
  ORDER BY
14
14
  now() - pg_stat_activity.query_start DESC;
@@ -1,10 +1,25 @@
1
1
  /* 10 queries that have longest execution time in aggregate */
2
2
 
3
- SELECT interval '1 millisecond' * total_time AS total_exec_time,
4
- to_char((total_time/sum(total_time) OVER()) * 100, 'FM90D0') || '%' AS prop_exec_time,
5
- to_char(calls, 'FM999G999G999G990') AS ncalls,
6
- interval '1 millisecond' * (blk_read_time + blk_write_time) AS sync_io_time,
7
- query AS query
8
- FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
9
- ORDER BY total_time DESC
10
- LIMIT 10;
3
+ SELECT
4
+ interval '1 millisecond' * total_time AS total_exec_time,
5
+ to_char((total_time/sum(total_time) OVER()) * 100, 'FM90D0') || '%' AS prop_exec_time,
6
+ to_char(calls, 'FM999G999G999G990') AS ncalls,
7
+ interval '1 millisecond' * (blk_read_time + blk_write_time) AS sync_io_time,
8
+ query AS query
9
+ FROM
10
+ pg_stat_statements
11
+ WHERE
12
+ userid = (
13
+ SELECT
14
+ usesysid
15
+ FROM
16
+ pg_user
17
+ WHERE
18
+ usename = current_user
19
+ LIMIT
20
+ 1
21
+ )
22
+ ORDER BY
23
+ total_time DESC
24
+ LIMIT
25
+ 10;
@@ -1,7 +1,9 @@
1
1
  /* Count of sequential scans by table descending by order */
2
2
 
3
- SELECT relname AS name,
4
- seq_scan as count
3
+ SELECT
4
+ relname AS name,
5
+ seq_scan as count
5
6
  FROM
6
7
  pg_stat_user_tables
7
- ORDER BY seq_scan DESC;
8
+ ORDER BY
9
+ seq_scan DESC;
@@ -1,9 +1,25 @@
1
1
  /* 10 queries that have longest execution time in aggregate */
2
2
 
3
- SELECT query AS qry,
4
- interval '1 millisecond' * total_time AS exec_time,
5
- to_char((total_time/sum(total_time) OVER()) * 100, 'FM90D0') || '%' AS prop_exec_time,
6
- to_char(calls, 'FM999G999G990') AS ncalls,
7
- interval '1 millisecond' * (blk_read_time + blk_write_time) AS sync_io_time
8
- FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
9
- ORDER BY calls DESC LIMIT 10;
3
+ SELECT
4
+ query AS qry,
5
+ interval '1 millisecond' * total_time AS exec_time,
6
+ to_char((total_time/sum(total_time) OVER()) * 100, 'FM90D0') || '%' AS prop_exec_time,
7
+ to_char(calls, 'FM999G999G990') AS ncalls,
8
+ interval '1 millisecond' * (blk_read_time + blk_write_time) AS sync_io_time
9
+ FROM
10
+ pg_stat_statements
11
+ WHERE
12
+ userid = (
13
+ SELECT
14
+ usesysid
15
+ FROM
16
+ pg_user
17
+ WHERE
18
+ usename = current_user
19
+ LIMIT
20
+ 1
21
+ )
22
+ ORDER BY
23
+ calls DESC
24
+ LIMIT
25
+ 10;
@@ -1,10 +1,16 @@
1
1
  /* Total size of all the indexes on each table, descending by size */
2
2
 
3
- SELECT c.relname AS table,
3
+ SELECT
4
+ c.relname AS table,
4
5
  pg_size_pretty(pg_indexes_size(c.oid)) AS index_size
5
- FROM pg_class c
6
- LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
7
- WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')
8
- AND n.nspname !~ '^pg_toast'
9
- AND c.relkind='r'
10
- ORDER BY pg_indexes_size(c.oid) DESC;
6
+ FROM
7
+ pg_class c
8
+ LEFT JOIN
9
+ pg_namespace n ON
10
+ (n.oid = c.relnamespace)
11
+ WHERE
12
+ n.nspname NOT IN ('pg_catalog', 'information_schema') AND
13
+ n.nspname !~ '^pg_toast' AND
14
+ c.relkind='r'
15
+ ORDER BY
16
+ pg_indexes_size(c.oid) DESC;
@@ -1,10 +1,15 @@
1
1
  /* Size of the tables (excluding indexes), descending by size */
2
2
 
3
- SELECT c.relname AS name,
3
+ SELECT
4
+ c.relname AS name,
4
5
  pg_size_pretty(pg_table_size(c.oid)) AS size
5
- FROM pg_class c
6
- LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
7
- WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')
8
- AND n.nspname !~ '^pg_toast'
9
- AND c.relkind='r'
10
- ORDER BY pg_table_size(c.oid) DESC;
6
+ FROM
7
+ pg_class c
8
+ LEFT JOIN
9
+ pg_namespace n ON
10
+ (n.oid = c.relnamespace)
11
+ WHERE
12
+ n.nspname NOT IN ('pg_catalog', 'information_schema') AND
13
+ n.nspname !~ '^pg_toast' AND c.relkind='r'
14
+ ORDER BY
15
+ pg_table_size(c.oid) DESC;
@@ -1,8 +1,13 @@
1
1
  /* Total size of all indexes in MB */
2
2
 
3
- SELECT pg_size_pretty(sum(c.relpages::bigint*8192)::bigint) AS size
4
- FROM pg_class c
5
- LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
6
- WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')
7
- AND n.nspname !~ '^pg_toast'
8
- AND c.relkind='i';
3
+ SELECT
4
+ pg_size_pretty(sum(c.relpages::bigint*8192)::bigint) AS size
5
+ FROM
6
+ pg_class c
7
+ LEFT JOIN
8
+ pg_namespace n ON
9
+ (n.oid = c.relnamespace)
10
+ WHERE
11
+ n.nspname NOT IN ('pg_catalog', 'information_schema') AND
12
+ n.nspname !~ '^pg_toast' AND
13
+ c.relkind='i';
@@ -1,10 +1,15 @@
1
1
  /* Size of the tables (including indexes), descending by size */
2
2
 
3
- SELECT c.relname AS name,
3
+ SELECT
4
+ c.relname AS name,
4
5
  pg_size_pretty(pg_total_relation_size(c.oid)) AS size
5
- FROM pg_class c
6
- LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
7
- WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')
8
- AND n.nspname !~ '^pg_toast'
9
- AND c.relkind='r'
10
- ORDER BY pg_total_relation_size(c.oid) DESC;
6
+ FROM
7
+ pg_class c
8
+ LEFT JOIN
9
+ pg_namespace n ON
10
+ (n.oid = c.relnamespace)
11
+ WHERE
12
+ n.nspname NOT IN ('pg_catalog', 'information_schema') AND
13
+ n.nspname !~ '^pg_toast' AND c.relkind='r'
14
+ ORDER BY
15
+ pg_total_relation_size(c.oid) DESC;
@@ -9,8 +9,15 @@ SELECT
9
9
  indexrelname AS index,
10
10
  pg_size_pretty(pg_relation_size(i.indexrelid)) AS index_size,
11
11
  idx_scan as index_scans
12
- FROM pg_stat_user_indexes ui
13
- JOIN pg_index i ON ui.indexrelid = i.indexrelid
14
- WHERE NOT indisunique AND idx_scan < 50 AND pg_relation_size(relid) > 5 * 8192
15
- ORDER BY pg_relation_size(i.indexrelid) / nullif(idx_scan, 0) DESC NULLS FIRST,
16
- pg_relation_size(i.indexrelid) DESC;
12
+ FROM
13
+ pg_stat_user_indexes ui
14
+ JOIN
15
+ pg_index i ON
16
+ ui.indexrelid = i.indexrelid
17
+ WHERE
18
+ NOT indisunique AND
19
+ idx_scan < 50 AND
20
+ pg_relation_size(relid) > 5 * 8192
21
+ ORDER BY
22
+ pg_relation_size(i.indexrelid) / nullif(idx_scan, 0) DESC NULLS FIRST,
23
+ pg_relation_size(i.indexrelid) DESC;
@@ -35,6 +35,10 @@ SELECT
35
35
  THEN 'yes'
36
36
  END AS expect_autovacuum
37
37
  FROM
38
- pg_stat_user_tables psut INNER JOIN pg_class ON psut.relid = pg_class.oid
39
- INNER JOIN vacuum_settings ON pg_class.oid = vacuum_settings.oid
38
+ pg_stat_user_tables psut INNER JOIN
39
+ pg_class ON
40
+ psut.relid = pg_class.oid
41
+ INNER JOIN
42
+ vacuum_settings ON
43
+ pg_class.oid = vacuum_settings.oid
40
44
  ORDER BY 1;
@@ -10,4 +10,4 @@ echo "= = ="
10
10
  echo "Index and table hit rate"
11
11
  echo
12
12
 
13
- run cache-hit.sql
13
+ run cache-hit-rate.sql
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project