PostgreSQL Index Usage Analysis

前端 未结 9 1657
伪装坚强ぢ
伪装坚强ぢ 2021-01-29 17:43

Is there a tool or method to analyze Postgres, and determine what missing indexes should be created, and which unused indexes should be removed? I have a little experience doing

9条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-29 18:16

    It can be found by using following query in postgres console

    use db_name
    select * from pg_stat_user_indexes;
    select * from pg_statio_user_indexes;
    

    For More Details https://www.postgresql.org/docs/current/monitoring-stats.html

提交回复
热议问题