explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fvpQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.201 14,241.410 ↑ 1.0 1 1

Aggregate (cost=67,524.98..67,524.99 rows=1 width=8) (actual time=14,241.409..14,241.410 rows=1 loops=1)

2. 0.093 14,241.209 ↑ 61.4 163 1

Limit (cost=0.56..67,399.97 rows=10,001 width=4) (actual time=140.588..14,241.209 rows=163 loops=1)

3. 14,240.981 14,241.116 ↑ 30,401.8 163 1

Index Scan using index_projects_on_visibility_level on projects (cost=0.56..33,396,368.81 rows=4,955,490 width=4) (actual time=140.587..14,241.116 rows=163 loops=1)

  • Index Cond: (visibility_level = 0)
  • Filter: ((NOT archived) AND (NOT pending_delete) AND ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (visibility_level = ANY ('{10,20}'::integer[]))))
  • Rows Removed by Filter: 8854572
4.          

SubPlan (forIndex Scan)

5. 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..3.58 rows=1 width=0) (never executed)

  • Index Cond: ((user_id = 384963) AND (project_id = projects.id))
  • Heap Fetches: 0
6. 0.135 0.135 ↓ 2.3 217 1

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_1 (cost=0.56..5.24 rows=96 width=4) (actual time=0.056..0.135 rows=217 loops=1)

  • Index Cond: (user_id = 384963)
  • Heap Fetches: 4
Planning time : 0.537 ms
Execution time : 14,241.474 ms