explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uf0c

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 17.081 ↑ 1.0 100 1

Limit (cost=1,277.09..1,277.34 rows=100 width=593) (actual time=17.067..17.081 rows=100 loops=1)

2. 0.199 17.074 ↑ 1.9 100 1

Sort (cost=1,277.09..1,277.56 rows=186 width=593) (actual time=17.065..17.074 rows=100 loops=1)

  • Sort Key: projects.created_at DESC, projects.id DESC
  • Sort Method: quicksort Memory: 117kB
3. 0.088 16.875 ↓ 1.1 200 1

Nested Loop (cost=436.77..1,270.08 rows=186 width=593) (actual time=15.779..16.875 rows=200 loops=1)

4. 0.073 15.787 ↓ 1.1 200 1

HashAggregate (cost=436.33..438.19 rows=186 width=4) (actual time=15.766..15.787 rows=200 loops=1)

  • Group Key: "*SELECT* 1".id
5. 0.019 15.714 ↓ 1.1 200 1

Append (cost=0.43..435.87 rows=186 width=4) (actual time=0.029..15.714 rows=200 loops=1)

6. 0.009 0.259 ↑ 1.0 100 1

Subquery Scan on *SELECT* 1 (cost=0.43..6.44 rows=100 width=4) (actual time=0.029..0.259 rows=100 loops=1)

7. 0.011 0.250 ↑ 1.0 100 1

Limit (cost=0.43..5.44 rows=100 width=12) (actual time=0.029..0.250 rows=100 loops=1)

8. 0.239 0.239 ↑ 13,681.3 100 1

Index Only Scan using projects_created_at_id_idx1 on projects projects_1 (cost=0.43..68,592.02 rows=1,368,127 width=12) (actual time=0.028..0.239 rows=100 loops=1)

  • Heap Fetches: 58
9. 0.013 15.436 ↓ 1.2 100 1

Subquery Scan on *SELECT* 2 (cost=428.35..429.43 rows=86 width=4) (actual time=15.410..15.436 rows=100 loops=1)

10. 0.007 15.423 ↓ 1.2 100 1

Limit (cost=428.35..428.57 rows=86 width=12) (actual time=15.409..15.423 rows=100 loops=1)

11. 0.285 15.416 ↓ 1.2 100 1

Sort (cost=428.35..428.57 rows=86 width=12) (actual time=15.408..15.416 rows=100 loops=1)

  • Sort Key: projects_2.created_at DESC, projects_2.id DESC
  • Sort Method: top-N heapsort Memory: 29kB
12. 0.934 15.131 ↓ 20.0 1,718 1

Nested Loop (cost=41.39..425.59 rows=86 width=12) (actual time=1.766..15.131 rows=1,718 loops=1)

13. 0.882 2.171 ↓ 20.0 1,718 1

HashAggregate (cost=40.96..41.82 rows=86 width=4) (actual time=1.744..2.171 rows=1,718 loops=1)

  • Group Key: project_authorizations.project_id
14. 1.289 1.289 ↓ 20.0 1,718 1

Index Only Scan Backward using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations (cost=0.56..40.74 rows=86 width=4) (actual time=0.023..1.289 rows=1,718 loops=1)

  • Index Cond: (user_id = 1562869)
  • Heap Fetches: 570
15. 12.026 12.026 ↑ 1.0 1 1,718

Index Scan using projects_pkey on projects projects_2 (cost=0.43..4.45 rows=1 width=12) (actual time=0.007..0.007 rows=1 loops=1,718)

  • Index Cond: (id = project_authorizations.project_id)
  • Filter: (NOT pending_delete)
16. 1.000 1.000 ↑ 1.0 1 200

Index Scan using projects_pkey on projects (cost=0.43..4.45 rows=1 width=593) (actual time=0.005..0.005 rows=1 loops=200)

  • Index Cond: (id = "*SELECT* 1".id)
Planning time : 1.348 ms
Execution time : 17.231 ms