Manually Delete Hands

Questions and discussion about PokerTracker 4 for Windows

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Manually Delete Hands

Postby karbyn » Sat Jun 27, 2020 5:32 pm

I want to delete hands that players at my limit haven't played. For example, if I'm playing 25NL, and I want to delete hands that players playing 25NL haven't played. So, if some of those players have played 10NL hands, I want to keep those hands, but delete the rest. I know there's no way to do this within PT4, and so I've written SQL queries in pgadmin; I just want to know if anyone else has experience with this, and has any insight, or gotchas, etc.

thx
karbyn
 
Posts: 17
Joined: Mon May 11, 2020 2:20 pm

Re: Manually Delete Hands

Postby WhiteRider » Sat Jun 27, 2020 6:54 pm

You can purge sessions by stake, but I'm not sure exactly what you mean that you want to get rid of. It isn't possible to delete a hand for one player but not another - you either remove the hand or you don't, and if you delete a hand it is removed for all players who played it.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Manually Delete Hands

Postby karbyn » Sat Jun 27, 2020 8:20 pm

I want to keep all the hands that have been played by players at my limit, for the stats. So in a 6max game, if a 5 players are exclusive to 10NL (in my db) but 1 has played 25NL, that hand would not be deleted. But if all 6 are exclusive to 10NL, that hand would get deleted. As I move up stakes and don't encounter the 10NL players anymore, I don' t need their history anymore. This will keep my db manageable.

Here's what I've done, via SQL:
  • identify players who play at my limit (25NL)
  • identified hands those players played across all limits
  • identified all the hands those players did not play
  • (now, I'm ready to) delete those hands
Now, I want to delete those hands across the 4 cash_hand tables that use 'id_hand'. The schema is simple enough, and there's no reason this shouldn't work, just checking to see if anyone has any additional advice or insight to doing something like this.
karbyn
 
Posts: 17
Joined: Mon May 11, 2020 2:20 pm

Re: Manually Delete Hands

Postby WhiteRider » Sun Jun 28, 2020 3:41 am

Removing hands from the database is more complex than simply removing the hand from the hand history table. Data from the hands is stored throughout the database for every player that was in the hand. If you were to remove only the hand history then the stats and players from that hand would remain, and that would make the data inconsistent.

We do not recommend manipulating the database manually outside of PT4, and the interaction between various elements of the data is complex.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Manually Delete Hands

Postby buttsexisaight » Sun May 03, 2026 9:29 pm

Helo,

is there a possibility now to do this? In Database -> Purge Hands, I can only purge whole MTTs, but not single hands. I have an MTT where we made a deal HU and then just kept going allin until it was over, but we were really deep, so it affects my stats. I would like to purge the last 3 hands of that tournament. Is there a possibility to do that?

Thank YOU!
buttsexisaight
 
Posts: 42
Joined: Tue Jan 08, 2013 3:13 pm

Re: Manually Delete Hands

Postby Flag_Hippo » Mon May 04, 2026 5:47 am

Individual hands cannot be purged. If you want to remove those hands you can do this:

1. Export the tournament:

Guide: Exporting Hands

2. Purge the tournament:

Guide: Purging Sessions & Tournaments

3. Open the exported file with a text editor such as Notepad. Manually remove the hands you do not want and save the change.

4. Import the file with the hands removed into PokerTracker 4 using 'Play Poker -> Get Hands From Disk'.
Flag_Hippo
Moderator
 
Posts: 17053
Joined: Tue Jan 31, 2012 7:50 am


Return to PokerTracker 4

Who is online

Users browsing this forum: No registered users and 29 guests