rails-pg-extras 1.4.0 → 1.5.0

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: 3306ddaeabad3f9e9b82a97fe044121a1df8924e092b6087625a606af0c198df
4
- data.tar.gz: 1ab601c34fbe458a9e0b09de4c15b1405fe5d3aa77f9cafd0dd3c37472f39af2
3
+ metadata.gz: 897f027634b0313e42a13d864678eac7f0280c00a9a39ca5d668cabbba970b02
4
+ data.tar.gz: d23efda1f8afcbd989278b9362baacb4882796115d7e70263a812787f95de340
5
5
  SHA512:
6
- metadata.gz: 298c4fd79dc18eab15c1c9e05e7676f5533d686052e4b189cf5da4f53b524b85d68fa4a4ef0c694d026fdaabe72fa28b1a0bee4507bde510c97b8f6a2bf877df
7
- data.tar.gz: 543fd9fe51a0f9143a3202639c91405f9669fe721c8946c5598e0e9655ba13ecec1d8ce93b50587f005c3323e050839e85fd30a337ddf3b7106ebc017b263a79
6
+ metadata.gz: 612408e64b97f03c70dcab7525cce2be8cafa4b9cf5eca27dd88013b5d74ffd08c5e68532599158c697d8754b9fa1ee534bbb698a9603df489d7394b1d036dab
7
+ data.tar.gz: f9c66eb8837a6720de96132e0941364aa3e83f627d52a04221efbbe2d361c1c9f2a24635057868c631ecee54fe42a9aa599b9a354f82341f84cd7a0ff2a524b2
data/README.md CHANGED
@@ -326,6 +326,22 @@ $ rake pg_extras:unused_indexes
326
326
 
327
327
  This command displays indexes that have < 50 scans recorded against them, and are greater than 5 pages in size, ordered by size relative to the number of index scans. This command is generally useful for eliminating indexes that are unused, which can impact write performance, as well as read performance should they occupy space in memory.
328
328
 
329
+ ### `null_indexes`
330
+
331
+ ```ruby
332
+
333
+ $ rake pg_extras:null_indexes
334
+
335
+ oid | index | index_size | unique | indexed_column | null_frac | expected_saving
336
+ ---------+--------------------+------------+--------+----------------+-----------+-----------------
337
+ 183764 | users_reset_token | 1445 MB | t | reset_token | 97.00% | 1401 MB
338
+ 88732 | plan_cancelled_at | 539 MB | f | cancelled_at | 8.30% | 44 MB
339
+ 9827345 | users_email | 18 MB | t | email | 28.67% | 5160 kB
340
+
341
+ ```
342
+
343
+ This commands displays indexes that contain `NULL` values. A high ratio of `NULL` values means that using a partial index excluding them will be beneficial in case they are not used for searching. [Source and more info](https://hakibenita.com/postgresql-unused-index-size).
344
+
329
345
  ### `seq_scans`
330
346
 
331
347
  ```
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsPGExtras
4
- VERSION = "1.4.0"
4
+ VERSION = "1.5.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-pg-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-26 00:00:00.000000000 Z
11
+ date: 2021-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-pg-extras
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.4.0
19
+ version: 1.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.4.0
26
+ version: 1.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement