rails-pg-extras 1.5.0 → 1.5.1
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 +50 -1
- data/lib/rails-pg-extras/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0322aaf3e072e39ad3174eb39bc66711c7738ad0e943aaac6056a4a42efa7368
|
4
|
+
data.tar.gz: 898d8e611d025487cf03c9ead7271427af08fb2604b35eab1c90e44b820e2769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49e97a75d7af406f40f070b97890d2c9eedc1c759c9941991b545596d344b3af9a1adfa23daf86998992fb409618160474e6075b7d158a83ff9b2d3b37dc659d
|
7
|
+
data.tar.gz: fb1549df9972842ef573ca47d4eaf0b17722b054be82693110afdc0cb0972b59ba25148794c1f743fc1e26fb8abe65c70f135c2339a99ab4495a5680550544cb
|
data/README.md
CHANGED
@@ -90,6 +90,8 @@ RailsPGExtras.long_running_queries(args: { threshold: "200 milliseconds" })
|
|
90
90
|
### `cache_hit`
|
91
91
|
|
92
92
|
```
|
93
|
+
RailsPGExtras.cache_hit
|
94
|
+
|
93
95
|
$ rake pg_extras:cache_hit
|
94
96
|
|
95
97
|
name | ratio
|
@@ -105,6 +107,8 @@ This command provides information on the efficiency of the buffer cache, for bot
|
|
105
107
|
|
106
108
|
```
|
107
109
|
|
110
|
+
RailsPGExtras.index_cache_hit
|
111
|
+
|
108
112
|
$ rake pg_extras:index_cache_hit
|
109
113
|
|
110
114
|
| name | buffer_hits | block_reads | total_read | ratio |
|
@@ -121,6 +125,8 @@ The same as `cache_hit` with each table's indexes cache hit info displayed separ
|
|
121
125
|
|
122
126
|
```
|
123
127
|
|
128
|
+
RailsPGExtras.table_cache_hit
|
129
|
+
|
124
130
|
$ rake pg_extras:table_cache_hit
|
125
131
|
|
126
132
|
| name | buffer_hits | block_reads | total_read | ratio |
|
@@ -136,6 +142,8 @@ The same as `cache_hit` with each table's cache hit info displayed seperately.
|
|
136
142
|
### `index_usage`
|
137
143
|
|
138
144
|
```
|
145
|
+
RailsPGExtras.index_usage
|
146
|
+
|
139
147
|
$ rake pg_extras:index_usage
|
140
148
|
|
141
149
|
relname | percent_of_times_index_used | rows_in_table
|
@@ -153,6 +161,8 @@ This command provides information on the efficiency of indexes, represented as w
|
|
153
161
|
### `locks`
|
154
162
|
|
155
163
|
```
|
164
|
+
RailsPGExtras.locks
|
165
|
+
|
156
166
|
$ rake pg_extras:locks
|
157
167
|
|
158
168
|
procpid | relname | transactionid | granted | query_snippet | mode | age
|
@@ -171,6 +181,8 @@ This command displays queries that have taken out an exclusive lock on a relatio
|
|
171
181
|
### `all_locks`
|
172
182
|
|
173
183
|
```
|
184
|
+
RailsPGExtras.all_locks
|
185
|
+
|
174
186
|
$ rake pg_extras:all_locks
|
175
187
|
```
|
176
188
|
|
@@ -179,6 +191,8 @@ This command displays all the current locks, regardless of their type.
|
|
179
191
|
### `outliers`
|
180
192
|
|
181
193
|
```
|
194
|
+
RubyPGExtras.outliers(args: { limit: 20 })
|
195
|
+
|
182
196
|
$ rake pg_extras:outliers
|
183
197
|
|
184
198
|
qry | exec_time | prop_exec_time | ncalls | sync_io_time
|
@@ -199,6 +213,8 @@ Typically, an efficient query will have an appropriate ratio of calls to total e
|
|
199
213
|
### `calls`
|
200
214
|
|
201
215
|
```
|
216
|
+
RubyPGExtras.calls(args: { limit: 10 })
|
217
|
+
|
202
218
|
$ rake pg_extras:calls
|
203
219
|
|
204
220
|
qry | exec_time | prop_exec_time | ncalls | sync_io_time
|
@@ -216,6 +232,8 @@ This command is much like `pg:outliers`, but ordered by the number of times a st
|
|
216
232
|
### `blocking`
|
217
233
|
|
218
234
|
```
|
235
|
+
RubyPGExtras.blocking
|
236
|
+
|
219
237
|
$ rake pg_extras:blocking
|
220
238
|
|
221
239
|
blocked_pid | blocking_statement | blocking_duration | blocking_pid | blocked_statement | blocked_duration
|
@@ -229,6 +247,8 @@ This command displays statements that are currently holding locks that other sta
|
|
229
247
|
#### `total_index_size`
|
230
248
|
|
231
249
|
```
|
250
|
+
RubyPGExtras.total_index_size
|
251
|
+
|
232
252
|
$ rake pg_extras:total_index_size
|
233
253
|
|
234
254
|
size
|
@@ -242,6 +262,8 @@ This command displays the total size of all indexes on the database, in MB. It i
|
|
242
262
|
### `index_size`
|
243
263
|
|
244
264
|
```
|
265
|
+
RubyPGExtras.index_size
|
266
|
+
|
245
267
|
$ rake pg_extras:index_size
|
246
268
|
name | size
|
247
269
|
---------------------------------------------------------------+---------
|
@@ -263,6 +285,8 @@ This command displays the size of each each index in the database, in MB. It is
|
|
263
285
|
### `table_size`
|
264
286
|
|
265
287
|
```
|
288
|
+
RubyPGExtras.table_size
|
289
|
+
|
266
290
|
$ rake pg_extras:table_size
|
267
291
|
|
268
292
|
name | size
|
@@ -280,6 +304,8 @@ This command displays the size of each table and materialized view in the databa
|
|
280
304
|
### `table_indexes_size`
|
281
305
|
|
282
306
|
```
|
307
|
+
RubyPGExtras.table_indexes_size
|
308
|
+
|
283
309
|
$ rake pg_extras:table_indexes_size
|
284
310
|
|
285
311
|
table | indexes_size
|
@@ -297,6 +323,8 @@ This command displays the total size of indexes for each table and materialized
|
|
297
323
|
### `total_table_size`
|
298
324
|
|
299
325
|
```
|
326
|
+
RubyPGExtras.total_table_size
|
327
|
+
|
300
328
|
$ rake pg_extras:total_table_size
|
301
329
|
|
302
330
|
name | size
|
@@ -314,6 +342,8 @@ This command displays the total size of each table and materialized view in the
|
|
314
342
|
### `unused_indexes`
|
315
343
|
|
316
344
|
```
|
345
|
+
RubyPGExtras.unused_indexes(args: { min_scans: 20 })
|
346
|
+
|
317
347
|
$ rake pg_extras:unused_indexes
|
318
348
|
|
319
349
|
table | index | index_size | index_scans
|
@@ -330,6 +360,8 @@ This command displays indexes that have < 50 scans recorded against them, and ar
|
|
330
360
|
|
331
361
|
```ruby
|
332
362
|
|
363
|
+
RailsPGExtras.null_indexes(args: { min_relation_size_mb: 10 })
|
364
|
+
|
333
365
|
$ rake pg_extras:null_indexes
|
334
366
|
|
335
367
|
oid | index | index_size | unique | indexed_column | null_frac | expected_saving
|
@@ -345,6 +377,8 @@ This commands displays indexes that contain `NULL` values. A high ratio of `NULL
|
|
345
377
|
### `seq_scans`
|
346
378
|
|
347
379
|
```
|
380
|
+
RubyPGExtras.seq_scans
|
381
|
+
|
348
382
|
$ rake pg_extras:seq_scans
|
349
383
|
|
350
384
|
name | count
|
@@ -373,6 +407,8 @@ This command displays the number of sequential scans recorded against all tables
|
|
373
407
|
### `long_running_queries`
|
374
408
|
|
375
409
|
```
|
410
|
+
RubyPGExtras.long_running_queries(args: { threshold: "200 milliseconds" })
|
411
|
+
|
376
412
|
$ rake pg_extras:long_running_queries
|
377
413
|
|
378
414
|
pid | duration | query
|
@@ -388,6 +424,8 @@ This command displays currently running queries, that have been running for long
|
|
388
424
|
### `records_rank`
|
389
425
|
|
390
426
|
```
|
427
|
+
RubyPGExtras.records_rank
|
428
|
+
|
391
429
|
$ rake pg_extras:records_rank
|
392
430
|
|
393
431
|
name | estimated_count
|
@@ -406,6 +444,8 @@ This command displays an estimated count of rows per table, descending by estima
|
|
406
444
|
### `bloat`
|
407
445
|
|
408
446
|
```
|
447
|
+
RubyPGExtras.bloat
|
448
|
+
|
409
449
|
$ rake pg_extras:bloat
|
410
450
|
|
411
451
|
type | schemaname | object_name | bloat | waste
|
@@ -423,6 +463,8 @@ This command displays an estimation of table "bloat" – space allocated to a re
|
|
423
463
|
### `vacuum_stats`
|
424
464
|
|
425
465
|
```
|
466
|
+
RubyPGExtras.vacuum_stats
|
467
|
+
|
426
468
|
$ rake pg_extras:vacuum_stats
|
427
469
|
|
428
470
|
schema | table | last_vacuum | last_autovacuum | rowcount | dead_rowcount | autovacuum_threshold | expect_autovacuum
|
@@ -448,10 +490,15 @@ This commands kills all the currently active connections to the database. It can
|
|
448
490
|
|
449
491
|
### `extensions`
|
450
492
|
|
451
|
-
```
|
493
|
+
```
|
452
494
|
|
453
495
|
RailsPGExtras.extensions
|
454
496
|
|
497
|
+
$ rake pg_extras:extensions
|
498
|
+
|
499
|
+
| pg_stat_statements | 1.7 | 1.7 | track execution statistics of all SQL statements executed
|
500
|
+
(truncated results for brevity)
|
501
|
+
|
455
502
|
```
|
456
503
|
|
457
504
|
This command lists all the currently installed and available PostgreSQL extensions.
|
@@ -459,6 +506,8 @@ This command lists all the currently installed and available PostgreSQL extensio
|
|
459
506
|
### mandelbrot
|
460
507
|
|
461
508
|
```
|
509
|
+
RailsPGExtras.mandelbrot
|
510
|
+
|
462
511
|
$ rake pg_extras:mandelbrot
|
463
512
|
```
|
464
513
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-pg-extras
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.5.
|
19
|
+
version: 1.5.1
|
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.5.
|
26
|
+
version: 1.5.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|