explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mUWP

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 8,014.500 ↑ 1.0 20 1

Limit (cost=90,123.20..90,123.25 rows=20 width=43) (actual time=8,014.489..8,014.500 rows=20 loops=1)

2. 12.608 8,014.494 ↑ 3,224.0 20 1

Sort (cost=90,123.20..90,284.40 rows=64,480 width=43) (actual time=8,014.487..8,014.494 rows=20 loops=1)

  • Sort Key: events.id DESC
  • Sort Method: top-N heapsort Memory: 27kB
3. 11.061 8,001.886 ↑ 2.3 28,259 1

Nested Loop (cost=1.57..88,407.41 rows=64,480 width=43) (actual time=0.071..8,001.886 rows=28,259 loops=1)

4. 3.899 114.385 ↓ 1.0 3,240 1

Nested Loop (cost=1.00..11,231.67 rows=3,224 width=4) (actual time=0.038..114.385 rows=3,240 loops=1)

5. 67.014 67.014 ↓ 1.0 3,344 1

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations (cost=0.56..103.02 rows=3,276 width=4) (actual time=0.026..67.014 rows=3,344 loops=1)

  • Index Cond: (user_id = 660180)
  • Heap Fetches: 480
6. 43.472 43.472 ↑ 1.0 1 3,344

Index Scan using projects_pkey on projects (cost=0.43..3.39 rows=1 width=4) (actual time=0.013..0.013 rows=1 loops=3,344)

  • Index Cond: (id = project_authorizations.project_id)
  • Filter: (NOT archived)
  • Rows Removed by Filter: 0
7. 6.480 7,876.440 ↑ 2.2 9 3,240

Limit (cost=0.57..23.54 rows=20 width=43) (actual time=0.497..2.431 rows=9 loops=3,240)

8. 7,869.960 7,869.960 ↑ 118.2 9 3,240

Index Scan Backward using index_events_on_project_id_and_id on events (cost=0.57..1,222.33 rows=1,064 width=43) (actual time=0.497..2.429 rows=9 loops=3,240)

  • Index Cond: (project_id = projects.id)
Planning time : 0.656 ms
Execution time : 8,014.547 ms