explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h1nx

Settings
# exclusive inclusive rows x rows loops node
1. 0.570 4,343.950 ↓ 958.0 958 1

Unique (cost=897,764.22..897,764.30 rows=1 width=270) (actual time=4,343.335..4,343.950 rows=958 loops=1)

2. 4.779 4,343.380 ↓ 958.0 958 1

Sort (cost=897,764.22..897,764.23 rows=1 width=270) (actual time=4,343.331..4,343.380 rows=958 loops=1)

  • Sort Key: ccgs.summary, ccgs.brand_id, 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. 453.395 4,338.601 ↓ 958.0 958 1

Hash Join (cost=1,010.27..897,764.21 rows=1 width=270) (actual time=1,227.005..4,338.601 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. 821.240 3,885.182 ↓ 18.6 1,578,600 1

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

  • Workers Planned: 7
  • Workers Launched: 7
5. 3,063.942 3,063.942 ↓ 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,209.745..3,063.942 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.006 0.024 ↑ 10.0 1 1

Hash (cost=10.10..10.10 rows=10 width=182) (actual time=0.024..0.024 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.018..0.018 rows=1 loops=1)

Planning time : 0.613 ms
Execution time : 4,357.409 ms