explain.depesz.com

A tool for finding a real cause for slow queries.

Result: HDqk

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.141 19,298.351 ↑ 1.0 1 1

Aggregate (cost=72,609.12..72,609.14 rows=1 width=8) (actual time=19,298.351..19,298.351 rows=1 loops=1)

2. 31.115 19,298.210 ↓ 475.0 475 1

Merge Join (cost=59,370.30..72,609.11 rows=1 width=8) (actual time=19,241.272..19,298.210 rows=475 loops=1)

  • Merge Cond: ((players_real_buys.uid)::text = (players.uid)::text)
3. 3.238 14.925 ↓ 30.7 10,143 1

Unique (cost=0.00..13,234.67 rows=330 width=8) (actual time=0.053..14.925 rows=10,143 loops=1)

4. 11.687 11.687 ↓ 3.0 28,380 1

Index Scan using players_real_buys_ppid_date_uid_ts_idx on players_real_buys (cost=0.00..13,210.96 rows=9,486 width=8) (actual time=0.051..11.687 rows=28,380 loops=1)

  • Index Cond: ((ppid = '001000'::bpchar) AND (date = 1340841600))
5. 349.822 19,252.170 ↓ 113,657.0 113,657 1

Sort (cost=59,370.30..59,370.30 rows=1 width=16) (actual time=19,240.998..19,252.170 rows=113,657 loops=1)

  • Sort Key: players.uid
  • Sort Method: quicksort Memory: 10352kB
6. 2,873.627 18,902.348 ↓ 113,659.0 113,659 1

Hash Join (cost=58,944.56..59,370.29 rows=1 width=16) (actual time=16,002.436..18,902.348 rows=113,659 loops=1)

  • Hash Cond: (players_tag.player_id = players.id)
7. 44.314 150.474 ↓ 4.5 80,875 1

HashAggregate (cost=58,914.26..59,093.51 rows=17,925 width=4) (actual time=124.052..150.474 rows=80,875 loops=1)

8. 68.410 106.160 ↓ 1.2 80,875 1

Bitmap Heap Scan on players_tag (cost=22,315.76..58,745.18 rows=67,633 width=4) (actual time=38.598..106.160 rows=80,875 loops=1)

  • Recheck Cond: ((date = 1340582400) AND ((tag_name)::text = 'poker::rabbits'::text))
  • Filter: ((tag_value)::text = '010'::text)
9. 37.750 37.750 ↑ 1.6 437,435 1

Bitmap Index Scan on players_tag_date_tag_name_player_id_idx (cost=0.00..22,298.86 rows=716,195 width=0) (actual time=37.750..37.750 rows=437,435 loops=1)

  • Index Cond: ((date = 1340582400) AND ((tag_name)::text = 'poker::rabbits'::text))
10. 290.765 15,878.247 ↓ 696,407.0 696,407 1

Hash (cost=30.29..30.29 rows=1 width=32) (actual time=15,878.247..15,878.247 rows=696,407 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 48967kB
11. 578.389 15,587.482 ↓ 696,407.0 696,407 1

Nested Loop (cost=16.05..30.29 rows=1 width=32) (actual time=355.680..15,587.482 rows=696,407 loops=1)

12. 141.606 576.501 ↓ 601,358.0 601,358 1

Unique (cost=16.05..16.05 rows=1 width=12) (actual time=355.647..576.501 rows=601,358 loops=1)

13. 190.209 434.895 ↓ 605,223.0 605,223 1

Sort (cost=16.05..16.05 rows=1 width=12) (actual time=355.644..434.895 rows=605,223 loops=1)

  • Sort Key: pih.player_id, pih.last_login
  • Sort Method: quicksort Memory: 52946kB
14. 244.686 244.686 ↓ 605,223.0 605,223 1

Index Scan using players_info_history_ppid_date_player_id_idx on players_info_history pih (cost=0.00..16.04 rows=1 width=12) (actual time=0.043..244.686 rows=605,223 loops=1)

  • Index Cond: ((ppid = '001000'::bpchar) AND (date = 1340841600))
15. 14,432.592 14,432.592 ↑ 1.0 1 601,358

Index Scan using players_id_idx on players (cost=0.00..14.21 rows=1 width=20) (actual time=0.023..0.024 rows=1 loops=601,358)

  • Index Cond: (id = pih.player_id)