explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BPrv

Settings
# exclusive inclusive rows x rows loops node
1. 0.993 3,706.585 ↓ 958.0 958 1

Unique (cost=897,764.22..897,764.30 rows=1 width=270) (actual time=3,705.510..3,706.585 rows=958 loops=1)

2. 8.247 3,705.592 ↓ 958.0 958 1

Sort (cost=897,764.22..897,764.23 rows=1 width=270) (actual time=3,705.505..3,705.592 rows=958 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: quicksort Memory: 510kB
3. 357.199 3,697.345 ↓ 958.0 958 1

Hash Join (cost=1,010.27..897,764.21 rows=1 width=270) (actual time=933.389..3,697.345 rows=958 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. 707.606 3,340.113 ↓ 18.6 1,578,600 1

Gather (cost=1,000.00..896,801.64 rows=84,648 width=270) (actual time=933.108..3,340.113 rows=1,578,600 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
5. 2,632.507 2,632.507 ↓ 16.3 197,325 8 / 8

Parallel Seq Scan on invoice_summary ccgs (cost=0.00..887,336.83 rows=12,093 width=270) (actual time=918.005..2,632.507 rows=197,325 loops=8)

  • Filter: (date_trunc('MONTH'::text, (summary)::timestamp with time zone) = date_trunc('MONTH'::text, ('2019-10-01'::date)::timestamp with time zone))
  • Rows Removed by Filter: 2119986
6. 0.007 0.033 ↑ 10.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.026 0.026 ↑ 10.0 1 1

Seq Scan on revenue_parameters_temp rpt (cost=0.00..10.10 rows=10 width=182) (actual time=0.026..0.026 rows=1 loops=1)

Planning time : 0.707 ms
Execution time : 3,715.613 ms