PDA

View Full Version : Hands list doesn't show up



DocBru
03-07-2009, 10:58 AM
For some reason most of the times the hands don't show up.

They seem to be there, so the totals row is correct, but the screen remains white.

It doesn't happen 100%, sometimes I see hands.. but most of the times not.

http://img264.imageshack.us/img264/913/handsdontshowup.th.png (http://img264.imageshack.us/my.php?image=handsdontshowup.png)

morny
03-07-2009, 11:25 AM
Hi Can you download this latest version http://www.holdemmanager.com/downloads/Hm1.08Beta.exe and if the problem persists export your hands http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173 and then create a new database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=146 and reimport the hands into the new database

DocBru
03-09-2009, 06:12 PM
Hi Morny,

I have some millions of hands in my database and reimporting them isnt really an option since it would take probably weeks at my current import speed. I would probably rather forget about the detail hands list, but this is a key functionality.

I did some further analysis, it seems that the hands are actually retrieved, but extremely slow.

This is really strange, since I can run filters on all hands in the DB within seconds, but receiving 100 hand details for the filter will take very long.

I did an SQL analysis and found the problematic statement which took almost 3 minutes to retrieve 100 hands I played today:


explain analyze select PH.PokerHand_ID,PH.PreFlopPlayerActionType_ID,PH.S treetWentAllin,PH.HandTimeStamp,GT.GameTypeDescrip tion,PH.holecard1int,PH.holecard2int,PKH.FlopCard1 int,PKH.flopcard2int,PKH.flopcard3int,PKH.TurnCard int,PKH.RiverCardint,PH.flopplayerActionType_ID,PH .turnplayerActionType_ID,PH.riverplayerActionType_ ID,PH.NetAmountWon,GT.BigBlind,PH.PositionType_ID, PH.preflopaction_id,PH.didpfr,PH.didvpip,(case when PH.StreetWentAllIn > 0 then (Select SklanskyBucks from AllInSituations where ph.playerhand_id = allinsituations.playerhand_id) else 0 end) as SklanskyBucks,(case when PH.StreetWentAllIn > 0 then (Select EquityPct from AllInSituations where ph.playerhand_id = allinsituations.playerhand_id) else 0 end) as EquityPct,getwinningplayerjoincash(ph.pokerhand_id ) as winningplayerjoin from playerhandscashkeycolumns_hero ph join pokerhands_hero pkh on ph.pokerhand_id = pkh.pokerhand_id join players pl on (pl.player_id = ph.player_id) join gametypes gt on gt.gametype_id = ph.gametype_id left join allinsituations_hero ev on ph.playerhand_id = ev.playerhand_id where (ph.player_id = 161) and (ph.gametype_id = 1 or ph.gametype_id = 2 or ph.gametype_id = 3 or ph.gametype_id = 4 or ph.gametype_id = 5 or ph.gametype_id = 11 or ph.gametype_id = 12 or ph.gametype_id = 23) and ph.handtimestamp > to_timestamp('03/09/2009 00:00:00','mm/dd/yyyy hh24:mi:ss') and GT.GameTypeDescription = '$0.5/1 NL' order by PH.HandTimeStamp desc limit 100


I ran an explain analyze on this with the following result:


Limit (cost=132.85..132.86 rows=1 width=69) (actual time=164214.741..164215.032 rows=100 loops=1)
-> Sort (cost=132.85..132.86 rows=1 width=69) (actual time=164214.736..164214.822 rows=100 loops=1)
Sort Key: ph.handtimestamp
-> Nested Loop (cost=0.00..132.84 rows=1 width=69) (actual time=7.359..164209.235 rows=839 loops=1)
-> Nested Loop Left Join (cost=0.00..107.69 rows=1 width=59) (actual time=0.391..21.540 rows=844 loops=1)
-> Nested Loop (cost=0.00..102.38 rows=1 width=59) (actual time=0.372..8.767 rows=844 loops=1)
Join Filter: (gt.gametype_id = ph.gametype_id)
-> Nested Loop (cost=0.00..21.38 rows=1 width=27) (actual time=0.052..0.117 rows=1 loops=1)
-> Index Scan using gametypes_pkey on gametypes gt (cost=0.00..13.06 rows=1 width=23) (actual time=0.022..0.041 rows=1 loops=1)
Filter: ((gametypedescription)::text = '$0.5/1 NL'::text)
-> Index Scan using players_pkey on players pl (cost=0.00..8.31 rows=1 width=4) (actual time=0.020..0.062 rows=1 loops=1)
Index Cond: (161 = player_id)
-> Index Scan Backward using playerhandscashkeycolumns_hero_idx1 on playerhandscashkeycolumns_hero ph (cost=0.00..80.62 rows=31 width=48) (actual time=0.297..4.433 rows=844 loops=1)
Index Cond: ((player_id = 161) AND (handtimestamp > to_timestamp('03/09/2009 00:00:00'::text, 'mm/dd/yyyy hh24:mi:ss'::text)))
Filter: ((gametype_id = 1) OR (gametype_id = 2) OR (gametype_id = 3) OR (gametype_id = 4) OR (gametype_id = 5) OR (gametype_id = 11) OR (gametype_id = 12) OR (gametype_id = 23))
-> Index Scan using allinsituations_hero_pkey on allinsituations_hero ev (cost=0.00..5.30 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=844)
Index Cond: (ph.playerhand_id = ev.playerhand_id)
-> Index Scan using pokerhands_hero_pkey on pokerhands_hero pkh (cost=0.00..8.33 rows=1 width=14) (actual time=0.007..0.010 rows=1 loops=844)
Index Cond: (ph.pokerhand_id = pkh.pokerhand_id)
SubPlan
-> Index Scan using allinsituations_pkey on allinsituations (cost=0.00..8.40 rows=1 width=2) (actual time=0.004..0.007 rows=1 loops=23)
Index Cond: ($0 = playerhand_id)
-> Index Scan using allinsituations_pkey on allinsituations (cost=0.00..8.40 rows=1 width=4) (actual time=0.045..0.048 rows=1 loops=23)
Index Cond: ($0 = playerhand_id)
Total runtime: 164215.508 ms


Maybe a developer could look into this if he has any idea...


Thanks
Bruno

DocBru
03-09-2009, 06:54 PM
I vacuumed / analyzed the tables: no help

Interesting to note: I ran the same query onto the non-_hero tables, takes the same amount of time.

Recordcount in pokerhands_hero: 461.000
Recordcount in pokerhands: 7.085.000

any help / ideas appreciated.

Actually I don't remember since when the hand list virtually stopped working for me. But i remember I didnt have these problems at all until some point

DocBru
03-09-2009, 07:10 PM
Ok guys forget it.. the new beta pointed me on how to turn off the winner columns... returns in less than a sec now.

sorry :)