@@ -7,24 +7,6 @@ Originally from: [tweet](https://twitter.com/samokhvalov/status/1734467240832201
7
7
> I post a new PostgreSQL "howto" article every day. Join me in this
8
8
> journey – [ subscribe] ( https://twitter.com/samokhvalov/ ) , provide feedback, share!
9
9
10
- ---------
11
- 🛠️ ** Correction:** In [ Day 75: How to find unused indexes] ( 0075_how_to_find_unused_indexes.md ) , the provided "simple"
12
- version of the query finding unused indexes lacked an important filter to exclude unique indexes. Of course, unique
13
- indexes must be excluded from consideration – even if such an index is not used, it has an important role. The corrected
14
- version:
15
-
16
- ``` sql
17
- select *
18
- from pg_stat_user_indexes
19
- where
20
- idx_scan = 0
21
- and not indisunique;
22
- ```
23
-
24
- The "advanced" version of the query provided in the post includes this filter.
25
-
26
- ---------
27
-
28
10
Let's discuss today how to find and clean up redundant indexes.
29
11
30
12
## What is a redundant index?
0 commit comments