pghero 3.6.1 → 3.6.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/CHANGELOG.md +19 -1
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/lib/pghero/methods/sequences.rb +8 -3
- data/lib/pghero/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ddf920adafa90b3c49ff86f3abd05d23bb22ed3be2b27786dc8f755b308b90e
|
4
|
+
data.tar.gz: 60758c308a9f298c54993c2118a8594ef3a56fd01ff5a7f0864821296f3d4a40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c65e4c0dc52a9312e6c832c68fccbeccd1c8307ecb747b00a640a08b7d58223cd20a3c92ad0747cf2681ff4b0fcd3003e02d5617d0a6f3d9a69ee9b0f1cf4f2
|
7
|
+
data.tar.gz: e764269d546c4931fc5fd1680f2f25ad699f406830a7a3a1923174c8b9053393c6e124e4e049bccc11ab779071a3500a4e15a7db17cb8b22edfbe83d625c162d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 3.6.2 (2025-03-21)
|
2
|
+
|
3
|
+
- Improved query in `sequences` method
|
4
|
+
|
1
5
|
## 3.6.1 (2024-10-14)
|
2
6
|
|
3
7
|
- Fixed error when Propshaft is installed but not used
|
@@ -491,4 +495,18 @@ PgHero.with(:database2) { PgHero.running_queries }
|
|
491
495
|
|
492
496
|
## 0.1.0 (2014-07-23)
|
493
497
|
|
494
|
-
-
|
498
|
+
- Improved explanations
|
499
|
+
- Updated design
|
500
|
+
|
501
|
+
## 0.0.3 (2014-07-22)
|
502
|
+
|
503
|
+
- Fixed `missing_indexes` method
|
504
|
+
|
505
|
+
## 0.0.2 (2014-07-21)
|
506
|
+
|
507
|
+
- Added `unused_tables` method
|
508
|
+
- Added `database_size` method
|
509
|
+
|
510
|
+
## 0.0.1 (2014-07-21)
|
511
|
+
|
512
|
+
- First release
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@ A performance dashboard for Postgres
|
|
4
4
|
|
5
5
|
[See it in action](https://pghero.dokkuapp.com/)
|
6
6
|
|
7
|
-
[](https://pghero.dokkuapp.com/)
|
8
8
|
|
9
9
|
:tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
|
10
10
|
|
@@ -39,14 +39,19 @@ module PgHero
|
|
39
39
|
|
40
40
|
add_sequence_attributes(sequences)
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
last_value = {}
|
43
|
+
sequences.select { |s| s[:readable] }.map { |s| [s[:schema], s[:sequence]] }.uniq.each_slice(1024) do |slice|
|
44
|
+
sql = slice.map { |s| "SELECT last_value FROM #{quote_ident(s[0])}.#{quote_ident(s[1])}" }.join(" UNION ALL ")
|
44
45
|
|
45
46
|
select_all(sql).zip(slice) do |row, seq|
|
46
|
-
seq
|
47
|
+
last_value[seq] = row[:last_value]
|
47
48
|
end
|
48
49
|
end
|
49
50
|
|
51
|
+
sequences.select { |s| s[:readable] }.each do |seq|
|
52
|
+
seq[:last_value] = last_value[[seq[:schema], seq[:sequence]]]
|
53
|
+
end
|
54
|
+
|
50
55
|
# use to_s for unparsable sequences
|
51
56
|
sequences.sort_by { |s| s[:sequence].to_s }
|
52
57
|
end
|
data/lib/pghero/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pghero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-22 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activerecord
|
@@ -24,7 +23,6 @@ dependencies:
|
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '6.1'
|
27
|
-
description:
|
28
26
|
email: andrew@ankane.org
|
29
27
|
executables: []
|
30
28
|
extensions: []
|
@@ -109,7 +107,6 @@ homepage: https://github.com/ankane/pghero
|
|
109
107
|
licenses:
|
110
108
|
- MIT
|
111
109
|
metadata: {}
|
112
|
-
post_install_message:
|
113
110
|
rdoc_options: []
|
114
111
|
require_paths:
|
115
112
|
- lib
|
@@ -124,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
121
|
- !ruby/object:Gem::Version
|
125
122
|
version: '0'
|
126
123
|
requirements: []
|
127
|
-
rubygems_version: 3.
|
128
|
-
signing_key:
|
124
|
+
rubygems_version: 3.6.2
|
129
125
|
specification_version: 4
|
130
126
|
summary: A performance dashboard for Postgres
|
131
127
|
test_files: []
|