explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KHqy

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 2.449 ↑ 1.0 20 1

Limit (cost=0.56..165.18 rows=20 width=737) (actual time=2.050..2.449 rows=20 loops=1)

2. 1.497 2.438 ↑ 333,966.0 20 1

Index Scan Backward using foo on projects (cost=0.56..54,975,998.60 rows=6,679,319 width=737) (actual time=2.048..2.438 rows=20 loops=1)

  • Filter: ((NOT pending_delete) AND ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (visibility_level = ANY ('{10,20}'::integer[]))))
  • Rows Removed by Filter: 106
3.          

SubPlan (for Index Scan Backward)

4. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations (cost=0.56..4.58 rows=1 width=0) (never executed)

  • Index Cond: ((user_id = 1562869) AND (project_id = projects.id))
  • Heap Fetches: 0
5. 0.941 0.941 ↓ 12.0 2,094 1

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_1 (cost=0.56..9.61 rows=174 width=4) (actual time=0.029..0.941 rows=2,094 loops=1)

  • Index Cond: (user_id = 1562869)
  • Heap Fetches: 96
Planning time : 1.017 ms
Execution time : 2.566 ms