explain.depesz.com

PostgreSQL's explain analyze made readable

Result: s3Ey

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 6,818.931 ↑ 1.0 100 1

Limit (cost=36,973,513.67..36,973,513.92 rows=100 width=631) (actual time=6,818.889..6,818.931 rows=100 loops=1)

2. 923.262 6,818.916 ↑ 55,924.5 100 1

Sort (cost=36,973,513.67..36,987,494.80 rows=5,592,452 width=631) (actual time=6,818.887..6,818.916 rows=100 loops=1)

  • Sort Key: projects.created_at DESC, projects.id DESC
  • Sort Method: top-N heapsort Memory: 72kB
3. 5,894.033 5,895.654 ↑ 4.1 1,366,247 1

Seq Scan on projects (cost=0.00..36,759,774.17 rows=5,592,452 width=631) (actual time=2.380..5,895.654 rows=1,366,247 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: 8578687
4.          

SubPlan (for Seq 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 = 1562869) AND (project_id = projects.id))
  • Heap Fetches: 0
6. 1.621 1.621 ↓ 20.0 1,719 1

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_1 (cost=0.56..31.07 rows=86 width=4) (actual time=0.028..1.621 rows=1,719 loops=1)

  • Index Cond: (user_id = 1562869)
  • Heap Fetches: 570
Planning time : 0.609 ms
Execution time : 6,819.068 ms