explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dsZX

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 19.078 ↑ 1.0 1 1

Aggregate (cost=13,037.85..13,037.86 rows=1 width=8) (actual time=19.078..19.078 rows=1 loops=1)

2. 11.648 21.908 ↓ 680.0 680 1

Gather (cost=1,017.89..13,037.85 rows=1 width=0) (actual time=2.286..21.908 rows=680 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 0.197 10.260 ↓ 340.0 340 2 / 2

Nested Loop Semi Join (cost=17.89..12,037.75 rows=1 width=0) (actual time=0.996..10.260 rows=340 loops=2)

4. 0.651 1.496 ↓ 93.0 372 2 / 2

Parallel Bitmap Heap Scan on channels (cost=17.04..1,172.48 rows=4 width=4) (actual time=0.919..1.496 rows=372 loops=2)

  • Recheck Cond: (user_id = 4)
  • Filter: (NOT default_channel)
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=456
5. 0.845 0.845 ↑ 1.5 764 1 / 2

Bitmap Index Scan on index_channels_on_user_id (cost=0.00..17.04 rows=1,147 width=0) (actual time=1.689..1.689 rows=764 loops=1)

  • Index Cond: (user_id = 4)
6. 0.227 8.567 ↑ 261,199.0 1 745 / 2

Nested Loop (cost=0.85..104.33 rows=261,199 width=4) (actual time=0.023..0.023 rows=1 loops=745)

7. 5.960 5.960 ↑ 43.0 1 745 / 2

Index Scan using index_collections_on_channel_id_and_id on collections (cost=0.42..34.28 rows=43 width=8) (actual time=0.016..0.016 rows=1 loops=745)

  • Index Cond: (channel_id = channels.id)
8. 2.380 2.380 ↑ 1.0 1 680 / 2

Index Scan using videos_pkey on videos (cost=0.43..1.63 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=680)

  • Index Cond: (id = collections.video_id)
  • Filter: (published AND (deleted IS NOT TRUE))
Planning time : 0.755 ms
Execution time : 22.062 ms