explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5O2m

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.005 1.297 ↓ 2.0 2 1

Nested Loop (cost=542.77..1,903.39 rows=1 width=150) (actual time=1.282..1.297 rows=2 loops=1)

  • Join Filter: (s.channel_id = c.channel_id)
2. 0.011 1.284 ↓ 2.0 2 1

Hash Join (cost=542.48..1,897.21 rows=1 width=60) (actual time=1.273..1.284 rows=2 loops=1)

  • Hash Cond: (s.channel_id = l.channel_id)
3. 0.022 0.041 ↑ 13.0 3 1

Bitmap Heap Scan on schedule s (cost=7.07..1,355.16 rows=39 width=40) (actual time=0.031..0.041 rows=3 loops=1)

  • Recheck Cond: (program_id = 1357654)
  • Filter: ((to_timestamp((ends_at)::double precision) >= now()) AND (to_timestamp((starts_at)::double precision) <= (now() + '07:00:00'::interval)))
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=7
4. 0.019 0.019 ↑ 50.0 7 1

Bitmap Index Scan on schedule_new_program_id_idx1 (cost=0.00..7.06 rows=350 width=0) (actual time=0.019..0.019 rows=7 loops=1)

  • Index Cond: (program_id = 1357654)
5. 0.160 1.232 ↓ 6.0 798 1

Hash (cost=533.74..533.74 rows=134 width=20) (actual time=1.232..1.232 rows=798 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 49kB
6. 0.976 1.072 ↓ 6.0 798 1

Bitmap Heap Scan on lineup_channels l (cost=5.48..533.74 rows=134 width=20) (actual time=0.182..1.072 rows=798 loops=1)

  • Recheck Cond: (lineup_id = 53707)
  • Heap Blocks: exact=795
7. 0.096 0.096 ↓ 6.0 798 1

Bitmap Index Scan on lineup_channels_new_lineup_id_idx1 (cost=0.00..5.44 rows=134 width=0) (actual time=0.096..0.096 rows=798 loops=1)

  • Index Cond: (lineup_id = 53707)
8. 0.008 0.008 ↑ 1.0 1 2

Index Scan using channel_new_channel_id_idx1 on channel c (cost=0.29..6.16 rows=1 width=61) (actual time=0.004..0.004 rows=1 loops=2)

  • Index Cond: (channel_id = l.channel_id)
Planning time : 0.569 ms
Execution time : 1.349 ms