explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Lvkm : DH2

Settings
# exclusive inclusive rows x rows loops node
1. 244.974 2,189.647 ↓ 15,829.3 47,488 1

GroupAggregate (cost=11,524.46..11,524.61 rows=3 width=186) (actual time=1,770.218..2,189.647 rows=47,488 loops=1)

  • Group Key: lsu.id, sa.impression_total, sa.audience_calculation_method, sa.running_times
2. 367.015 1,944.673 ↓ 63,317.3 189,952 1

Sort (cost=11,524.46..11,524.47 rows=3 width=116) (actual time=1,770.194..1,944.673 rows=189,952 loops=1)

  • Sort Key: lsu.id, sa.impression_total, sa.audience_calculation_method, sa.running_times
  • Sort Method: external merge Disk: 25512kB
3. 261.475 1,577.658 ↓ 63,317.3 189,952 1

Nested Loop Left Join (cost=1.71..11,524.44 rows=3 width=116) (actual time=0.059..1,577.658 rows=189,952 loops=1)

4. 165.803 746.327 ↓ 63,317.3 189,952 1

Nested Loop (cost=1.28..11,516.28 rows=3 width=86) (actual time=0.052..746.327 rows=189,952 loops=1)

5. 10.668 10.668 ↓ 12.5 13,568 1

Index Only Scan using proposal_item_screen_proposal_item_id_screen_id_unique_idx on proposal_item_screen pis (cost=0.43..1,132.98 rows=1,089 width=16) (actual time=0.018..10.668 rows=13,568 loops=1)

  • Index Cond: (proposal_item_id = ANY ('{35902,35903,35905,35904}'::integer[]))
  • Heap Fetches: 13568
6. 176.384 569.856 ↓ 14.0 14 13,568

Nested Loop (cost=0.85..9.52 rows=1 width=86) (actual time=0.008..0.042 rows=14 loops=13,568)

7. 27.136 27.136 ↑ 1.0 1 13,568

Index Scan using proposal_package_pkey on proposal_item pi (cost=0.29..2.94 rows=1 width=34) (actual time=0.002..0.002 rows=1 loops=13,568)

  • Index Cond: (id = pis.proposal_item_id)
8. 366.336 366.336 ↓ 14.0 14 13,568

Index Scan using lean_screen_usage_unique_idx on lean_screen_usage lsu (cost=0.56..6.57 rows=1 width=66) (actual time=0.005..0.027 rows=14 loops=13,568)

  • Index Cond: ((screen_id = pis.screen_id) AND (running_date >= pi.start_date) AND (running_date <= pi.end_date) AND (running_date >= '2019-03-06'::date) AND (running_date <= '2019-03-19'::date))
  • Filter: ((running_times && '[00:00:00,23:59:59)'::timerange) AND (running_times && timerange(pi.start_time, pi.end_time, '[)'::text)) AND ((dow_mask & (pi.dow_mask)::integer) > 0))
9. 569.856 569.856 ↑ 2.0 1 189,952

Index Scan using screen_audience_screen_id_running_date_idx on screen_audience sa (cost=0.43..2.70 rows=2 width=42) (actual time=0.002..0.003 rows=1 loops=189,952)

  • Index Cond: ((lsu.screen_id = screen_id) AND (lsu.running_date = running_date))