explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kPuq

Settings
# exclusive inclusive rows x rows loops node
1. 0.453 32,209.212 ↑ 3.8 13 1

Result (cost=6,802,326.69..6,802,366.07 rows=50 width=180) (actual time=32,209.121..32,209.212 rows=13 loops=1)

2. 0.052 32,208.759 ↑ 3.8 13 1

Sort (cost=6,802,326.69..6,802,326.82 rows=50 width=116) (actual time=32,208.757..32,208.759 rows=13 loops=1)

  • Sort Key: traders.registration_month
  • Sort Method: quicksort Memory: 26kB
3. 1,823.449 32,208.707 ↑ 3.8 13 1

HashAggregate (cost=6,802,323.53..6,802,325.28 rows=50 width=116) (actual time=32,208.698..32,208.707 rows=13 loops=1)

  • Group Key: traders.registration_month
4. 13,585.584 30,385.258 ↓ 1.4 8,832,532 1

Hash Join (cost=5,804,760.05..6,586,489.31 rows=6,166,692 width=28) (actual time=12,654.994..30,385.258 rows=8,832,532 loops=1)

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

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

6. 1,609.991 12,496.382 ↓ 1.5 8,549,083 1

Hash (cost=5,709,849.94..5,709,849.94 rows=5,784,969 width=8) (actual time=12,496.382..12,496.382 rows=8,549,083 loops=1)

  • Buckets: 2097152 Batches: 8 Memory Usage: 58116kB
7. 10,065.056 10,886.391 ↓ 1.5 8,549,083 1

Bitmap Heap Scan on traders (cost=675,931.50..5,709,849.94 rows=5,784,969 width=8) (actual time=1,016.209..10,886.391 rows=8,549,083 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=602387
8. 821.335 821.335 ↓ 1.0 8,730,375 1

Bitmap Index Scan on traders_registration_month_index (cost=0.00..674,485.26 rows=8,564,524 width=0) (actual time=821.335..821.335 rows=8,730,375 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 : 2.009 ms
Execution time : 32,218.387 ms