explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fMuM

Settings
# exclusive inclusive rows x rows loops node
1. 0.162 25,726.004 ↑ 3.9 13 1

Result (cost=6,493,338.33..6,493,378.50 rows=51 width=180) (actual time=25,725.921..25,726.004 rows=13 loops=1)

2. 0.011 25,725.842 ↑ 3.9 13 1

Sort (cost=6,493,338.33..6,493,338.46 rows=51 width=116) (actual time=25,725.841..25,725.842 rows=13 loops=1)

  • Sort Key: traders.registration_month
  • Sort Method: quicksort Memory: 26kB
3. 1,803.958 25,725.831 ↑ 3.9 13 1

HashAggregate (cost=6,493,335.10..6,493,336.89 rows=51 width=116) (actual time=25,725.822..25,725.831 rows=13 loops=1)

  • Group Key: traders.registration_month
4. 8,565.373 23,921.873 ↓ 1.4 8,834,458 1

Hash Join (cost=5,744,148.18..6,279,561.44 rows=6,107,819 width=28) (actual time=13,844.313..23,921.873 rows=8,834,458 loops=1)

  • Hash Cond: (monthly_traders.trader_id = traders.id)
5. 1,647.196 1,647.196 ↓ 1.0 16,548,248 1

Seq Scan on monthly_traders (cost=0.00..492,459.46 rows=16,363,346 width=28) (actual time=0.004..1,647.196 rows=16,548,248 loops=1)

6. 3,094.023 13,709.304 ↓ 1.5 8,550,936 1

Hash (cost=5,672,321.47..5,672,321.47 rows=5,746,137 width=8) (actual time=13,709.304..13,709.304 rows=8,550,936 loops=1)

  • Buckets: 16777216 (originally 8388608) Batches: 1 (originally 1) Memory Usage: 465093kB
7. 9,851.863 10,615.281 ↓ 1.5 8,550,936 1

Bitmap Heap Scan on traders (cost=666,390.95..5,672,321.47 rows=5,746,137 width=8) (actual time=957.871..10,615.281 rows=8,550,936 loops=1)

  • Recheck Cond: (registration_month = ANY ('{2018-06-01,2018-07-01,2018-08-01,2018-09-01,2018-10-01,2018-11-01,2018-12-01,2019-01-01,2019-02-01,2019-03-01,201
  • Filter: (registration_country_id = ANY ('{1,10,100,102,106,108,109,11,110,111,112,113,114,115,116,118,119,12,120,121,125,126,127,128,129,130,131,133,134,135
  • Rows Removed by Filter: 10576
  • Heap Blocks: exact=601690
8. 763.418 763.418 ↓ 1.0 8,562,057 1

Bitmap Index Scan on traders_registration_month_index (cost=0.00..664,954.42 rows=8,462,285 width=0) (actual time=763.418..763.418 rows=8,562,057 loops=1)

  • Index Cond: (registration_month = ANY ('{2018-06-01,2018-07-01,2018-08-01,2018-09-01,2018-10-01,2018-11-01,2018-12-01,2019-01-01,2019-02-01,2019-03-01
Planning time : 0.638 ms
Execution time : 25,753.818 ms