explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YPZQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 493,523.656 ↑ 1,521.7 11 1

Unique (cost=183,724.17..183,807.86 rows=16,739 width=96) (actual time=493,523.647..493,523.656 rows=11 loops=1)

  • Buffers: shared hit=66,289 read=30,504
  • I/O Timings: read=151,023.037
2. 0.297 493,523.648 ↑ 380.4 44 1

Sort (cost=183,724.17..183,766.01 rows=16,739 width=96) (actual time=493,523.646..493,523.648 rows=44 loops=1)

  • Sort Key: em2.event_id
  • Sort Method: quicksort Memory: 31kB
  • Buffers: shared hit=66,289 read=30,504
  • I/O Timings: read=151,023.037
3. 0.076 493,523.351 ↑ 380.4 44 1

Nested Loop (cost=4,822.78..182,549.85 rows=16,739 width=96) (actual time=199,642.571..493,523.351 rows=44 loops=1)

  • Buffers: shared hit=66,289 read=30,504
  • I/O Timings: read=151,023.037
4. 2.249 2.249 ↓ 2.0 2 1

Index Scan using event_metadata_pkey on event_metadata (cost=0.69..16.72 rows=1 width=24) (actual time=1.452..2.249 rows=2 loops=1)

  • Index Cond: ((event_id)::text = 'crid:~~2F~~2Fjoery.tv~~2FE2E40-Single786-V11,imi:c67554870e2f6411bb09b6aac5e1beaaa3350b56'::text)
  • Filter: (channel_id = 'E2E40'::text)
  • Buffers: shared hit=3 read=4
  • I/O Timings: read=1.378
5. 491,027.648 493,521.026 ↑ 760.9 22 2

Bitmap Heap Scan on event_metadata em2 (cost=4,822.10..182,365.74 rows=16,739 width=136) (actual time=201,949.312..246,760.513 rows=22 loops=2)

  • Recheck Cond: (((channel_id = 'E2E40'::text) AND (event_metadata.start_time >= end_time)) OR ((channel_id = 'E2E40'::text) AND (event_metadata.end_time <= start_time)))
  • Filter: ((NOT deleted) AND (((event_metadata.start_time >= end_time) AND (event_metadata.start_time <= technical_end_time)) OR ((event_metadata.end_time >= technical_start_time) AND (event_metadata.end_time <= start_time))))
  • Rows Removed by Filter: 77,718
  • Heap Blocks: exact=94,838
  • Buffers: shared hit=66,286 read=30,500
  • I/O Timings: read=151,021.659
6. 0.014 2,493.378 ↓ 0.0 0 2

BitmapOr (cost=4,822.10..4,822.10 rows=55,831 width=0) (actual time=1,246.689..1,246.689 rows=0 loops=2)

  • Buffers: shared hit=966 read=982
  • I/O Timings: read=1,664.133
7. 2,480.882 2,480.882 ↓ 1.5 42,015 2

Bitmap Index Scan on idx_event_metadata_channel_id_start_time_end_time (cost=0.00..3,610.02 rows=27,915 width=0) (actual time=1,240.441..1,240.441 rows=42,015 loops=2)

  • Index Cond: ((channel_id = 'E2E40'::text) AND (event_metadata.start_time >= end_time))
  • Buffers: shared hit=605 read=981
  • I/O Timings: read=1,664.130
8. 12.482 12.482 ↓ 1.3 36,096 2

Bitmap Index Scan on idx_event_metadata_channel_id_start_time_end_time (cost=0.00..1,203.71 rows=27,915 width=0) (actual time=6.241..6.241 rows=36,096 loops=2)

  • Index Cond: ((channel_id = 'E2E40'::text) AND (event_metadata.end_time <= start_time))
  • Buffers: shared hit=361 read=1
  • I/O Timings: read=0.003
Planning time : 0.696 ms
Execution time : 493,523.727 ms