explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FgJW

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 126,699.683 ↑ 1.0 20 1

Limit (cost=2,876,576.52..2,876,576.57 rows=20 width=72) (actual time=126,699.678..126,699.683 rows=20 loops=1)

  • Buffers: shared hit=2,821,026 read=38,464 dirtied=432
  • I/O Timings: read=51,644.850
2. 0.554 126,699.679 ↑ 137.6 20 1

Sort (cost=2,876,576.52..2,876,583.40 rows=2,752 width=72) (actual time=126,699.676..126,699.679 rows=20 loops=1)

  • Sort Key: events.id DESC
  • Sort Method: top-N heapsort Memory: 30kB
  • Buffers: shared hit=2,821,026 read=38,464 dirtied=432
  • I/O Timings: read=51,644.850
3. 20.498 126,699.125 ↑ 3.9 701 1

Nested Loop (cost=1,044.18..2,876,503.29 rows=2,752 width=72) (actual time=6,563.328..126,699.125 rows=701 loops=1)

  • Buffers: shared hit=2,821,023 read=38,464 dirtied=432
  • I/O Timings: read=51,644.850
4. 38.316 7,865.327 ↓ 1.6 4,300 1

Nested Loop (cost=1.01..5,615.51 rows=2,752 width=4) (actual time=10.304..7,865.327 rows=4,300 loops=1)

  • Buffers: shared hit=14,760 read=4,862 dirtied=321
  • I/O Timings: read=7,619.916
5. 2,060.711 2,060.711 ↓ 1.6 4,300 1

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations (cost=0.57..69.73 rows=2,752 width=4) (actual time=5.350..2,060.711 rows=4,300 loops=1)

  • Index Cond: (user_id = 1)
  • Heap Fetches: 779
  • Buffers: shared hit=1,542 read=830 dirtied=77
  • I/O Timings: read=2,022.803
6. 5,766.300 5,766.300 ↑ 1.0 1 4,300

Index Only Scan using projects_pkey on projects (cost=0.43..2.02 rows=1 width=4) (actual time=1.341..1.341 rows=1 loops=4,300)

  • Index Cond: (id = project_authorizations.project_id)
  • Heap Fetches: 485
  • Buffers: shared hit=13,218 read=4,032 dirtied=244
  • I/O Timings: read=5,597.113
7. 21.500 118,813.300 ↓ 0.0 0 4,300

Limit (cost=1,043.18..1,043.18 rows=1 width=72) (actual time=27.631..27.631 rows=0 loops=4,300)

  • Buffers: shared hit=2,806,263 read=33,602 dirtied=111
  • I/O Timings: read=44,024.934
8. 111.800 118,791.800 ↓ 0.0 0 4,300

Sort (cost=1,043.18..1,043.18 rows=1 width=72) (actual time=27.626..27.626 rows=0 loops=4,300)

  • Sort Key: events.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2,806,263 read=33,602 dirtied=111
  • I/O Timings: read=44,024.934
9. 5,005.200 118,680.000 ↑ 1.0 1 4,300

Bitmap Heap Scan on events (cost=1,041.65..1,043.17 rows=1 width=72) (actual time=26.498..27.600 rows=1 loops=4,300)

  • Recheck Cond: ((project_id = projects.id) AND ((target_type)::text = 'DesignManagement::Design'::text))
  • Heap Blocks: exact=2,590
  • Buffers: shared hit=2,806,263 read=33,602 dirtied=111
  • I/O Timings: read=44,024.934
10. 359.420 113,674.800 ↓ 0.0 0 4,300

BitmapAnd (cost=1,041.65..1,041.65 rows=1 width=0) (actual time=26.436..26.436 rows=0 loops=4,300)

  • Buffers: shared hit=2,806,253 read=31,022
  • I/O Timings: read=39,448.328
11. 41,000.500 41,000.500 ↑ 1.4 1,234 4,300

Bitmap Index Scan on index_events_on_project_id_and_id (cost=0.00..25.93 rows=1,781 width=0) (actual time=9.535..9.535 rows=1,234 loops=4,300)

  • Index Cond: (project_id = projects.id)
  • Buffers: shared hit=10,627 read=30,360
  • I/O Timings: read=38,679.617
12. 72,314.880 72,314.880 ↓ 1.1 91,341 4,224

Bitmap Index Scan on index_events_on_target_type_and_target_id (cost=0.00..1,015.47 rows=82,319 width=0) (actual time=17.120..17.120 rows=91,341 loops=4,224)

  • Index Cond: ((target_type)::text = 'DesignManagement::Design'::text)
  • Buffers: shared hit=2,795,626 read=662
  • I/O Timings: read=768.711
Planning time : 432.286 ms
Execution time : 126,699.901 ms