explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t4mW : Optimization for: plan #H41I

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=24.08..24.09 rows=1 width=112) (actual rows= loops=)

  • Group Key: distribution_identified_playbacks.channel_id, (COALESCE(sum(distribution_identified_playbacks_1.duration_in_seconds), '0'::double precision)), (COALESCE(sum(distribution_identified_playbacks_1.duration_in_seconds) FILTER (WHERE (distribution_identified_playbacks_1.rerun IS NOT TRUE)), '0'::double precision)), (COALESCE(sum(distribution_identified_playbacks_1.duration_in_seconds) FILTER (WHERE (distribution_identified_playbacks_1.rerun IS TRUE)), '0'::double precision)), (COALESCE(sum(distribution_identified_playbacks_1.duration_in_seconds) FILTER (WHERE (distribution_identified_playbacks_1.playback_type = 'music_video'::text)), '0'::double precision))
2. 0.000 0.000 ↓ 0.0

Sort (cost=24.08..24.08 rows=1 width=60) (actual rows= loops=)

  • Sort Key: distribution_identified_playbacks.channel_id, (COALESCE(sum(distribution_identified_playbacks_1.duration_in_seconds), '0'::double precision)), (COALESCE(sum(distribution_identified_playbacks_1.duration_in_seconds) FILTER (WHERE (distribution_identified_playbacks_1.rerun IS NOT TRUE)), '0'::double precision)), (COALESCE(sum(distribution_identified_playbacks_1.duration_in_seconds) FILTER (WHERE (distribution_identified_playbacks_1.rerun IS TRUE)), '0'::double precision)), (COALESCE(sum(distribution_identified_playbacks_1.duration_in_seconds) FILTER (WHERE (distribution_identified_playbacks_1.playback_type = 'music_video'::text)), '0'::double precision))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.35..24.08 rows=1 width=60) (actual rows= loops=)

  • Join Filter: (distribution_identified_playbacks.channel_id = distribution_identified_playbacks_1.channel_id)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.31..12.03 rows=1 width=28) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.23..8.24 rows=1 width=16) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Index Scan using distribution_snapshot_allocation_basis_snapshot_id_sector on distribution_snapshot_allocation_basis (cost=0.14..4.14 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (distribution_snapshot_id = 'c6d72d69-a36a-412e-b223-a4d5d3c3cf4c'::uuid)
7. 0.000 0.000 ↓ 0.0

Index Scan using distribution_playback_accretion_pkey on distribution_playback_accretion (cost=0.09..4.09 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = distribution_snapshot_allocation_basis.distribution_playback_accretion_id)
8. 0.000 0.000 ↓ 0.0

Index Scan using distribution_identified_playbacks_pkey on distribution_identified_playbacks (cost=0.09..3.79 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = distribution_playback_accretion.distribution_identified_playback_id)
9. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=12.04..12.04 rows=1 width=48) (actual rows= loops=)

  • Group Key: distribution_identified_playbacks_1.channel_id
10. 0.000 0.000 ↓ 0.0

Sort (cost=12.04..12.04 rows=1 width=31) (actual rows= loops=)

  • Sort Key: distribution_identified_playbacks_1.channel_id
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.33..12.03 rows=1 width=31) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Unique (cost=8.24..8.24 rows=1 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Sort (cost=8.24..8.24 rows=1 width=4) (actual rows= loops=)

  • Sort Key: distribution_playback_accretion_1.distribution_identified_playback_id
14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.23..8.24 rows=1 width=4) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Index Scan using distribution_snapshot_allocation_basis_snapshot_id_sector on distribution_snapshot_allocation_basis distribution_snapshot_allocation_basis_1 (cost=0.14..4.14 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (distribution_snapshot_id = 'c6d72d69-a36a-412e-b223-a4d5d3c3cf4c'::uuid)
16. 0.000 0.000 ↓ 0.0

Index Scan using distribution_playback_accretion_pkey on distribution_playback_accretion distribution_playback_accretion_1 (cost=0.09..4.09 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = distribution_snapshot_allocation_basis_1.distribution_playback_accretion_id)
17. 0.000 0.000 ↓ 0.0

Index Scan using distribution_identified_playbacks_pkey on distribution_identified_playbacks distribution_identified_playbacks_1 (cost=0.09..3.79 rows=1 width=35) (actual rows= loops=)

  • Index Cond: (id = distribution_playback_accretion_1.distribution_identified_playback_id)