explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Or5Wb

Settings
# exclusive inclusive rows x rows loops node
1. 13.360 25,548.531 ↑ 1.0 21 1

Limit (cost=1,352,501.49..1,352,643.11 rows=21 width=733) (actual time=25,536.574..25,548.531 rows=21 loops=1)

2. 25,528.374 25,535.171 ↑ 33.0 200,581 1

Index Scan Backward using index_projects_on_last_activity_at on projects (cost=0.56..44,629,105.48 rows=6,617,972 width=733) (actual time=7.590..25,535.171 rows=200,581 loops=1)

  • Filter: ((NOT archived) AND ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (visibility_level = ANY ('{10,20}'::integer[]))))
  • Rows Removed by Filter: 1,559,693
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..3.58 rows=1 width=0) (never executed)

  • Index Cond: ((user_id = 2,167,502) AND (project_id = projects.id))
  • Heap Fetches: 0
5. 6.797 6.797 ↓ 10.9 1,998 1

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_1 (cost=0.56..41.22 rows=183 width=4) (actual time=0.236..6.797 rows=1,998 loops=1)

  • Index Cond: (user_id = 2,167,502)
  • Heap Fetches: 474
Planning time : 6.430 ms
Execution time : 25,548.778 ms