explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EWyd

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 121.974 ↑ 1.0 8 1

Limit (cost=804,797.82..804,797.84 rows=8 width=13) (actual time=121.972..121.974 rows=8 loops=1)

2. 16.352 121.973 ↑ 9,912.6 8 1

Sort (cost=804,797.82..804,996.07 rows=79,301 width=13) (actual time=121.972..121.973 rows=8 loops=1)

  • Sort Key: this_.amount DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 14.565 105.621 ↑ 1.6 49,772 1

Hash Semi Join (cost=5,790.34..803,211.80 rows=79,301 width=13) (actual time=33.296..105.621 rows=49,772 loops=1)

  • Hash Cond: (pl1_.parent_id = player.parent_id)
4. 19.353 90.218 ↑ 1.6 49,772 1

Hash Join (cost=5,739.45..802,070.52 rows=79,301 width=17) (actual time=32.450..90.218 rows=49,772 loops=1)

  • Hash Cond: (this_.player_id = pl1_.id)
5. 39.049 70.402 ↑ 1.6 49,772 1

Bitmap Heap Scan on internal_transaction this_ (cost=5,695.58..800,936.26 rows=79,301 width=13) (actual time=31.974..70.402 rows=49,772 loops=1)

  • Recheck Cond: (date >= ((now())::date - 3))
  • Filter: (type_id = 2)
  • Rows Removed by Filter: 165942
  • Heap Blocks: exact=2504
6. 31.353 31.353 ↑ 1.4 215,714 1

Bitmap Index Scan on idx_internal_transaction_date (cost=0.00..5,675.75 rows=307,090 width=0) (actual time=31.353..31.353 rows=215,714 loops=1)

  • Index Cond: (date >= ((now())::date - 3))
7. 0.183 0.463 ↑ 1.0 572 1

Hash (cost=36.72..36.72 rows=572 width=8) (actual time=0.463..0.463 rows=572 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
8. 0.280 0.280 ↑ 1.0 572 1

Seq Scan on player pl1_ (cost=0.00..36.72 rows=572 width=8) (actual time=0.008..0.280 rows=572 loops=1)

9. 0.086 0.838 ↑ 1.0 392 1

Hash (cost=45.99..45.99 rows=392 width=4) (actual time=0.838..0.838 rows=392 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 22kB
10. 0.546 0.752 ↑ 1.0 392 1

HashAggregate (cost=38.15..42.07 rows=392 width=4) (actual time=0.633..0.752 rows=392 loops=1)

  • Group Key: player.parent_id
11. 0.206 0.206 ↑ 1.0 572 1

Seq Scan on player (cost=0.00..36.72 rows=572 width=4) (actual time=0.008..0.206 rows=572 loops=1)

Planning time : 2.164 ms
Execution time : 122.070 ms