explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6s0k

Settings
# exclusive inclusive rows x rows loops node
1. 1.118 17,238.982 ↓ 958.0 958 1

Unique (cost=897,764.22..897,764.30 rows=1 width=270) (actual time=17,237.784..17,238.982 rows=958 loops=1)

2. 5.853 17,237.864 ↓ 958.0 958 1

Sort (cost=897,764.22..897,764.23 rows=1 width=270) (actual time=17,237.782..17,237.864 rows=958 loops=1)

  • Sort Key: invoice_summary.brand_id, invoice_summary.summary, invoice_summary.platform_id, invoice_summary.server, invoice_summary.currency_id, invoice_summary.country_id, invoice_summary.game, invoice_summary.game_category_symb_id, invoice_summary.spins, invoice_summary.real_bet, invoice_summary.real_bets_usd, invoice_summary.real_bets_euro, invoice_summary.real_win, invoice_summary.real_wins_usd, invoice_summary.real_wins_euro, invoice_summary.real_margin, invoice_summary.real_margin_usd, invoice_summary.real_margin_euro, invoice_summary.bets, invoice_summary.bets_usd, invoice_summary.bets_euro, invoice_summary.wins, invoice_summary.wins_usd, invoice_summary.wins_euro, invoice_summary.margin, invoice_summary.margin_usd, invoice_summary.margin_euro, invoice_summary.margin_jp_usd, invoice_summary.margin_jp_cont_usd, invoice_summary.game_id
  • Sort Method: quicksort Memory: 510kB
3. 514.135 17,232.011 ↓ 958.0 958 1

Hash Join (cost=1,010.27..897,764.21 rows=1 width=270) (actual time=8,407.196..17,232.011 rows=958 loops=1)

  • Hash Cond: (((invoice_summary.server)::text = (rpt.server)::text) AND (invoice_summary.platform_id = rpt.platform_id) AND (invoice_summary.brand_id = rpt.brand_id))
4. 405.656 16,717.854 ↓ 18.6 1,578,600 1

Gather (cost=1,000.00..896,801.64 rows=84,648 width=270) (actual time=8,405.847..16,717.854 rows=1,578,600 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
5. 16,312.198 16,312.198 ↓ 16.3 197,325 8 / 8

Parallel Seq Scan on invoice_summary (cost=0.00..887,336.83 rows=12,093 width=270) (actual time=8,317.029..16,312.198 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.005 0.022 ↑ 10.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.017 0.017 ↑ 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.017 rows=1 loops=1)

Planning time : 0.651 ms
Execution time : 17,247.252 ms