Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index_size to the query results #38

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sql/indexes_with_boolean.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
select
pi.indrelid::regclass::text as table_name,
pi.indexrelid::regclass::text as index_name,
pg_relation_size(pi.indexrelid) as index_size,
col.attname as column_name,
col.attnotnull as column_not_null
from
Expand Down
2 changes: 1 addition & 1 deletion sql/indexes_with_null_values.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
select
x.indrelid::regclass as table_name,
x.indexrelid::regclass as index_name,
string_agg(a.attname, ', ') as nullable_fields,
string_agg(a.attname, ', ') as nullable_fields, -- In fact, there will always be only one column.
pg_relation_size(x.indexrelid) as index_size
from
pg_catalog.pg_index x
Expand Down