explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tt5u

Settings
# exclusive inclusive rows x rows loops node
1. 0.556 3,824.440 ↓ 958.0 958 1

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

2. 4.886 3,823.884 ↓ 958.0 958 1

Sort (cost=897,764.22..897,764.23 rows=1 width=270) (actual time=3,823.836..3,823.884 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. 435.623 3,818.998 ↓ 958.0 958 1

Hash Join (cost=1,010.27..897,764.21 rows=1 width=270) (actual time=1,912.625..3,818.998 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. 887.214 3,383.354 ↓ 18.6 1,578,600 1

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

  • Workers Planned: 7
  • Workers Launched: 7
5. 2,496.140 2,496.140 ↓ 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=1,892.251..2,496.140 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.003 0.021 ↑ 10.0 1 1

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

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

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

Planning time : 0.340 ms
Execution time : 3,835.619 ms