explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7HSo

Settings
# exclusive inclusive rows x rows loops node
1. 0.172 21,810.820 ↑ 3.9 13 1

Result (cost=5,221,936.88..5,221,977.04 rows=51 width=180) (actual time=21,810.733..21,810.820 rows=13 loops=1)

2. 0.014 21,810.648 ↑ 3.9 13 1

Sort (cost=5,221,936.88..5,221,937.01 rows=51 width=116) (actual time=21,810.647..21,810.648 rows=13 loops=1)

  • Sort Key: traders.registration_month
  • Sort Method: quicksort Memory: 26kB
3. 1,827.039 21,810.634 ↑ 3.9 13 1

HashAggregate (cost=5,221,933.65..5,221,935.43 rows=51 width=116) (actual time=21,810.626..21,810.634 rows=13 loops=1)

  • Group Key: traders.registration_month
4. 8,690.586 19,983.595 ↓ 1.4 8,835,803 1

Hash Join (cost=4,472,746.73..5,008,159.98 rows=6,107,819 width=28) (actual time=9,757.389..19,983.595 rows=8,835,803 loops=1)

  • Hash Cond: (monthly_traders.trader_id = traders.id)
5. 1,670.890 1,670.890 ↓ 1.0 16,549,603 1

Seq Scan on monthly_traders (cost=0.00..492,459.46 rows=16,363,346 width=28) (actual time=0.005..1,670.890 rows=16,549,603 loops=1)

6. 3,059.092 9,622.119 ↓ 1.5 8,552,239 1

Hash (cost=4,400,242.77..4,400,242.77 rows=5,800,317 width=8) (actual time=9,622.119..9,622.119 rows=8,552,239 loops=1)

  • Buckets: 16777216 (originally 8388608) Batches: 1 (originally 1) Memory Usage: 465144kB
7. 5,569.114 6,563.027 ↓ 1.5 8,552,239 1

Bitmap Heap Scan on traders (cost=123,025.99..4,400,242.77 rows=5,800,317 width=8) (actual time=1,184.444..6,563.027 rows=8,552,239 loops=1)

  • Recheck Cond: ((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,
  • Heap Blocks: exact=601632
8. 993.913 993.913 ↓ 1.5 8,552,423 1

Bitmap Index Scan on idx_traders_20190611_01 (cost=0.00..121,575.91 rows=5,800,317 width=0) (actual time=993.913..993.913 rows=8,552,423 loops=1)

  • Index Cond: ((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,
Planning time : 1.540 ms
Execution time : 21,840.317 ms