explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vpjn

Settings
# exclusive inclusive rows x rows loops node
1. 7.242 10,059.698 ↑ 9.1 438 1

Finalize GroupAggregate (cost=5,015,138.50..5,015,900.05 rows=3,983 width=191) (actual time=8,670.807..10,059.698 rows=438 loops=1)

  • Group Key: live_daily_summary.brand_id, b.brand, (to_char((CURRENT_DATE)::timestamp with time zone, 'MONTH'::text))
2. 351.339 10,052.456 ↑ 1.1 3,673 1

Gather Merge (cost=5,015,138.50..5,015,651.09 rows=3,984 width=159) (actual time=8,669.422..10,052.456 rows=3,673 loops=1)

  • Workers Planned: 8
  • Workers Launched: 8
3. 642.336 9,701.117 ↑ 1.2 408 9 / 9

Partial GroupAggregate (cost=5,014,138.36..5,014,159.52 rows=498 width=159) (actual time=8,626.350..9,701.117 rows=408 loops=9)

  • Group Key: live_daily_summary.brand_id, b.brand, (to_char((CURRENT_DATE)::timestamp with time zone, 'MONTH'::text))
4. 2,263.090 9,058.781 ↓ 3,019.1 1,503,499 9 / 9

Sort (cost=5,014,138.36..5,014,139.60 rows=498 width=90) (actual time=8,626.019..9,058.781 rows=1,503,499 loops=9)

  • Sort Key: live_daily_summary.brand_id, b.brand
  • Sort Method: external merge Disk: 119,720kB
5. 1,346.483 6,795.691 ↓ 3,019.1 1,503,499 9 / 9

Hash Join (cost=35.25..5,014,116.05 rows=498 width=90) (actual time=1,930.607..6,795.691 rows=1,503,499 loops=9)

  • Hash Cond: ((live_daily_summary.brand_id)::text = (b.live_brand_id)::text)
6. 5,447.749 5,447.749 ↓ 30.1 1,503,499 9 / 9

Parallel Seq Scan on live_daily_summary (cost=0.00..5,010,268.58 rows=49,882 width=44) (actual time=1,928.882..5,447.749 rows=1,503,499 loops=9)

  • Filter: (date_trunc('month'::text, (summary)::timestamp with time zone) = '2020-08-01 00:00:00+05:30'::timestamp with time zone)
  • Rows Removed by Filter: 7,965,780
7. 0.136 1.459 ↓ 9.4 555 9 / 9

Hash (cost=34.51..34.51 rows=59 width=19) (actual time=1.459..1.459 rows=555 loops=9)

  • Buckets: 1,024 Batches: 1 Memory Usage: 47kB
8. 1.323 1.323 ↓ 9.4 555 9 / 9

Index Scan using brand_info_idx on brand_info b (cost=0.29..34.51 rows=59 width=19) (actual time=0.059..1.323 rows=555 loops=9)

  • Index Cond: (((product)::text = 'LIVE'::text) AND ((server)::text = 'LIVE'::text))
  • Filter: (start_date IS NOT NULL)
  • Rows Removed by Filter: 590
Planning time : 1.001 ms
Execution time : 10,076.434 ms