ruby-pg-extras 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/ruby-pg-extras/queries/null_indexes.sql +2 -1
- data/lib/ruby-pg-extras/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5536e950d12ba0a63deee72240de7d657f7cf33e8c5bb93622a5a29c6ba4898f
|
4
|
+
data.tar.gz: 8fa1ecf9537e4d4b8774e5fbbd37e7f329dd3d31a37ad83a93a7c1b5ad4fa9c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 836b17e1988508f27adcd8138f3d5d5c070e93bbb7ce28ad9e8f254582092798225d3cc96d5dce827662d9fcd98e82cbf08d5ea789cb2c3d65614f9865a7d134
|
7
|
+
data.tar.gz: de4d8f3511a66e1d636fa47fcccf828ad3bb9a6a3e0bb0f26fcf120674c7381b0422c94a210e102b78f4b1f82e56299762bfff85916dd0ee7b5800dfac10bc8d
|
data/README.md
CHANGED
@@ -355,7 +355,7 @@ This command displays indexes that have < 50 scans recorded against them, and ar
|
|
355
355
|
|
356
356
|
```ruby
|
357
357
|
|
358
|
-
RubyPGExtras.null_indexes
|
358
|
+
RubyPGExtras.null_indexes(args: { min_relation_size_mb: 10 })
|
359
359
|
|
360
360
|
oid | index | index_size | unique | indexed_column | null_frac | expected_saving
|
361
361
|
---------+--------------------+------------+--------+----------------+-----------+-----------------
|
@@ -393,7 +393,7 @@ This command displays the number of sequential scans recorded against all tables
|
|
393
393
|
|
394
394
|
```ruby
|
395
395
|
|
396
|
-
RubyPGExtras.long_running_queries
|
396
|
+
RubyPGExtras.long_running_queries(args: { threshold: "200 milliseconds" })
|
397
397
|
|
398
398
|
|
399
399
|
pid | duration | query
|
@@ -1,4 +1,5 @@
|
|
1
1
|
/* Find indexes with a high ratio of NULL values */
|
2
|
+
|
2
3
|
SELECT
|
3
4
|
c.oid,
|
4
5
|
c.relname AS index,
|
@@ -7,7 +8,7 @@ SELECT
|
|
7
8
|
a.attname AS indexed_column,
|
8
9
|
CASE s.null_frac
|
9
10
|
WHEN 0 THEN ''
|
10
|
-
ELSE to_char(s.null_frac * 100, '999.00
|
11
|
+
ELSE to_char(s.null_frac * 100, '999.00%%')
|
11
12
|
END AS null_frac,
|
12
13
|
pg_size_pretty((pg_relation_size(c.oid) * s.null_frac)::bigint) AS expected_saving
|
13
14
|
FROM
|