-
-
Notifications
You must be signed in to change notification settings - Fork 15
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 check "Do not index booleans" #322
Comments
mfvanek
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Nov 29, 2023
mfvanek
changed the title
Add check "Do not index boleans"
Add check "Do not index booleans"
Nov 30, 2023
Here is prototype of request that select indexes with boolean type in it. select -- pn.nspname,
pi.indrelid::regclass::text as table_name,
pi.indexrelid::regclass::text as index_name,
col.attname as column_name,
col.attnotnull as column_not_null
-- col.atttypid::regtype::text as column_type
from pg_catalog.pg_index pi
join pg_catalog.pg_class pc on pc.oid = pi.indexrelid
join pg_catalog.pg_namespace pn on pn.oid = pc.relnamespace
join pg_catalog.pg_attribute col on col.attrelid = pi.indrelid and col.attnum = any (pi.indkey)
where pn.nspname = 'public'::text
and NOT pi.indisunique
AND pi.indisready
AND pi.indisvalid
AND col.atttypid = 'boolean'::regtype
order by table_name, index_name; |
Evreke
added a commit
to mfvanek/pg-index-health-sql
that referenced
this issue
Feb 6, 2024
Query to check on indexes with boolean values.
Evreke
added a commit
to mfvanek/pg-index-health-sql
that referenced
this issue
Feb 6, 2024
Fix formatting. Add header and description.
Evreke
added a commit
to mfvanek/pg-index-health-sql
that referenced
this issue
Feb 6, 2024
Fix formatting. Add header and description.
mfvanek
pushed a commit
to mfvanek/pg-index-health-sql
that referenced
this issue
Feb 6, 2024
* mfvanek/pg-index-health#322 Query to check on indexes with boolean values. * mfvanek/pg-index-health#322 Fix formatting. Add header and description.
I'm going to implement this feature this week. Sorry for delay. |
Merged
This was referenced Apr 27, 2024
Need to
|
Merged
This was referenced Apr 30, 2024
Merged
This was referenced May 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Extracted from #45
See the article by Kirill Borovikov posted on Habr https://habr.com/ru/companies/tensor/articles/488104/
Part "Bad: too little (boolean)".
The text was updated successfully, but these errors were encountered: