explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uqMA

Settings
# exclusive inclusive rows x rows loops node
1. 0.143 54,186.620 ↑ 3.9 13 1

Result (cost=6,761,948.33..6,761,988.50 rows=51 width=180) (actual time=54,186.535..54,186.620 rows=13 loops=1)

2. 0.014 54,186.477 ↑ 3.9 13 1

Sort (cost=6,761,948.33..6,761,948.46 rows=51 width=116) (actual time=54,186.477..54,186.477 rows=13 loops=1)

  • Sort Key: traders.registration_month
  • Sort Method: quicksort Memory: 26kB
3. 1,832.848 54,186.463 ↑ 3.9 13 1

HashAggregate (cost=6,761,945.10..6,761,946.89 rows=51 width=116) (actual time=54,186.454..54,186.463 rows=13 loops=1)

  • Group Key: traders.registration_month
4. 35,659.008 52,353.615 ↓ 1.4 8,833,043 1

Hash Join (cost=5,766,594.18..6,548,171.44 rows=6,107,819 width=28) (actual time=12,604.425..52,353.615 rows=8,833,043 loops=1)

  • Hash Cond: (monthly_traders.trader_id = traders.id)
5. 4,237.127 4,237.127 ↓ 1.0 16,546,822 1

Seq Scan on monthly_traders (cost=0.00..492,459.46 rows=16,363,346 width=28) (actual time=0.005..4,237.127 rows=16,546,822 loops=1)

6. 1,576.270 12,457.480 ↓ 1.5 8,549,578 1

Hash (cost=5,672,321.47..5,672,321.47 rows=5,746,137 width=8) (actual time=12,457.480..12,457.480 rows=8,549,578 loops=1)

  • Buckets: 2097152 Batches: 8 Memory Usage: 58119kB
7. 10,075.405 10,881.210 ↓ 1.5 8,549,578 1

Bitmap Heap Scan on traders (cost=666,390.95..5,672,321.47 rows=5,746,137 width=8) (actual time=995.804..10,881.210 rows=8,549,578 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=601676
8. 805.805 805.805 ↓ 1.0 8,560,244 1

Bitmap Index Scan on traders_registration_month_index (cost=0.00..664,954.42 rows=8,462,285 width=0) (actual time=805.805..805.805 rows=8,560,244 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 : 1.489 ms
Execution time : 54,195.045 ms