explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Xiwg

Settings
# exclusive inclusive rows x rows loops node
1. 21.256 3,061.720 ↓ 44,633.0 44,633 1

Unique (cost=897,764.22..897,764.30 rows=1 width=270) (actual time=3,030.746..3,061.720 rows=44,633 loops=1)

2. 248.048 3,040.464 ↓ 44,633.0 44,633 1

Sort (cost=897,764.22..897,764.23 rows=1 width=270) (actual time=3,030.739..3,040.464 rows=44,633 loops=1)

  • Sort Key: ccgs.brand_id, ccgs.summary, ccgs.platform_id, ccgs.server, ccgs.currency_id, ccgs.country_id, ccgs.game, ccgs.game_category_symb_id, ccgs.spins, ccgs.real_bet, ccgs.real_bets_usd, ccgs.real_bets_euro, ccgs.real_win, ccgs.real_wins_usd, ccgs.real_wins_euro, ccgs.real_margin, ccgs.real_margin_usd, ccgs.real_margin_euro, ccgs.bets, ccgs.bets_usd, ccgs.bets_euro, ccgs.wins, ccgs.wins_usd, ccgs.wins_euro, ccgs.margin, ccgs.margin_usd, ccgs.margin_euro, ccgs.margin_jp_usd, ccgs.margin_jp_cont_usd, ccgs.game_id
  • Sort Method: external merge Disk: 13408kB
3. 298.186 2,792.416 ↓ 44,633.0 44,633 1

Hash Join (cost=1,010.27..897,764.21 rows=1 width=270) (actual time=1,125.502..2,792.416 rows=44,633 loops=1)

  • Hash Cond: (((ccgs.server)::text = (rpt.server)::text) AND (ccgs.platform_id = rpt.platform_id) AND (ccgs.brand_id = rpt.brand_id))
4. 702.203 2,494.158 ↓ 20.9 1,765,286 1

Gather (cost=1,000.00..896,801.64 rows=84,648 width=270) (actual time=1,118.198..2,494.158 rows=1,765,286 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
5. 1,791.955 1,791.955 ↓ 18.2 220,661 8 / 8

Parallel Seq Scan on invoice_summary ccgs (cost=0.00..887,336.83 rows=12,093 width=270) (actual time=1,104.154..1,791.955 rows=220,661 loops=8)

  • Filter: (date_trunc('MONTH'::text, (summary)::timestamp with time zone) = date_trunc('MONTH'::text, ('2019-12-01'::date)::timestamp with time zone))
  • Rows Removed by Filter: 2096668
6. 0.022 0.072 ↓ 1.7 17 1

Hash (cost=10.10..10.10 rows=10 width=182) (actual time=0.072..0.072 rows=17 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.050 0.050 ↓ 1.7 17 1

Seq Scan on revenue_parameters_temp_1 rpt (cost=0.00..10.10 rows=10 width=182) (actual time=0.041..0.050 rows=17 loops=1)

Planning time : 1.044 ms
Execution time : 3,070.141 ms