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 19298.351 ↑ 1.0 1 1

Aggregate (cost=72609.12..72609.14 rows=1 width=8) (actual time=19298.351..19298.351 rows=1 loops=1)

2. 31.115 19298.210 ↓ 475.0 475 1

Merge Join (cost=59370.30..72609.11 rows=1 width=8) (actual time=19241.272..19298.210 rows=475 loops=1)

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

Unique (cost=0.00..13234.67 rows=330 width=8) (actual time=0.053..14.925 rows=10143 loops=1)

4. 11.687 11.687 ↓ 3.0 28380 1

Index Scan using players_real_buys_ppid_date_uid_ts_idx on players_real_buys (cost=0.00..13210.96 rows=9486 width=8) (actual time=0.051..11.687 rows=28380 loops=1)

  • Index Cond: ((ppid = '001000'::bpchar) AND (date = 1340841600))
5. 349.822 19252.170 ↓ 113657.0 113657 1

Sort (cost=59370.30..59370.30 rows=1 width=16) (actual time=19240.998..19252.170 rows=113657 loops=1)

  • Sort Key: players.uid
  • Sort Method: quicksort Memory: 10352kB
6. 2873.627 18902.348 ↓ 113659.0 113659 1

Hash Join (cost=58944.56..59370.29 rows=1 width=16) (actual time=16002.436..18902.348 rows=113659 loops=1)

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

HashAggregate (cost=58914.26..59093.51 rows=17925 width=4) (actual time=124.052..150.474 rows=80875 loops=1)

8. 68.410 106.160 ↓ 1.2 80875 1

Bitmap Heap Scan on players_tag (cost=22315.76..58745.18 rows=67633 width=4) (actual time=38.598..106.160 rows=80875 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 437435 1

Bitmap Index Scan on players_tag_date_tag_name_player_id_idx (cost=0.00..22298.86 rows=716195 width=0) (actual time=37.750..37.750 rows=437435 loops=1)

  • Index Cond: ((date = 1340582400) AND ((tag_name)::text = 'poker::rabbits'::text))
10. 290.765 15878.247 ↓ 696407.0 696407 1

Hash (cost=30.29..30.29 rows=1 width=32) (actual time=15878.247..15878.247 rows=696407 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 48967kB
11. 578.389 15587.482 ↓ 696407.0 696407 1

Nested Loop (cost=16.05..30.29 rows=1 width=32) (actual time=355.680..15587.482 rows=696407 loops=1)

12. 141.606 576.501 ↓ 601358.0 601358 1

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

13. 190.209 434.895 ↓ 605223.0 605223 1

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

  • Sort Key: pih.player_id, pih.last_login
  • Sort Method: quicksort Memory: 52946kB
14. 244.686 244.686 ↓ 605223.0 605223 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=605223 loops=1)

  • Index Cond: ((ppid = '001000'::bpchar) AND (date = 1340841600))
15. 14432.592 14432.592 ↑ 1.0 1 601358

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=601358)

  • Index Cond: (id = pih.player_id)