explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TMHj

Settings
# exclusive inclusive rows x rows loops node
1. 96.181 2,414.439 ↑ 1.0 1 1

Aggregate (cost=621,211.22..621,211.23 rows=1 width=8) (actual time=2,414.439..2,414.439 rows=1 loops=1)

2. 106.281 2,318.258 ↑ 1.0 567,936 1

Nested Loop (cost=1.43..619,766.10 rows=578,050 width=4) (actual time=0.136..2,318.258 rows=567,936 loops=1)

3. 0.001 0.111 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.86..10.49 rows=1 width=4) (actual time=0.094..0.111 rows=1 loops=1)

  • Join Filter: (project_import_data.project_id = projects.id)
4. 0.039 0.063 ↑ 1.0 1 1

Index Scan using projects_pkey on projects (cost=0.43..7.04 rows=1 width=8) (actual time=0.049..0.063 rows=1 loops=1)

  • Index Cond: (id = 13083)
  • Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (visibility_level = ANY ('{10,20}'::integer[])))
5.          

SubPlan (forIndex Scan)

6. 0.024 0.024 ↓ 0.0 0 1

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) (actual time=0.024..0.024 rows=0 loops=1)

  • Index Cond: ((user_id = 710213) AND (project_id = projects.id))
  • Heap Fetches: 0
7. 0.000 0.000 ↓ 0.0 0

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) (never executed)

  • Index Cond: (user_id = 710213)
  • Heap Fetches: 0
8. 0.047 0.047 ↑ 1.0 1 1

Index Only Scan using index_project_import_data_on_project_id on project_import_data (cost=0.42..3.44 rows=1 width=4) (actual time=0.044..0.047 rows=1 loops=1)

  • Index Cond: (project_id = 13083)
  • Heap Fetches: 0
9. 2,211.866 2,211.866 ↑ 1.0 567,936 1

Index Scan using index_events_on_project_id_and_id on events (cost=0.57..613,975.10 rows=578,050 width=12) (actual time=0.042..2,211.866 rows=567,936 loops=1)

  • Index Cond: (project_id = 13083)
Planning time : 2.905 ms
Execution time : 2,414.526 ms