Answer the question
In order to leave comments, you need to log in
What indexes were used in the query?
Greetings!
Where and how to see which indexes were used in postgresql when querying?
I did explain and explain analyze, but I can’t understand where there is about indexes
Answer the question
In order to leave comments, you need to log in
If you don't see any indexes, then the scheduler has decided not to use the index. Here is the code from posgresql developer habr
postgres=# explain (costs off) select * from t where a = 1;
QUERY PLAN
-------------------------------
Index Scan using t_a_idx on t
Index Cond: (a = 1)
(2 rows)
где строчка " Index Scan using t_a_idx on t" означает использование индекса.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question