Purge players with less than x hands

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Purge players with less than x hands

Postby Ganadai » Wed Jan 13, 2010 2:11 am

Is it possible to purge players with less than x hands? I know it's not possible in PT3, but was wondering if it's possible to do with a PostgreSQL script. I also realize that removing players requires the entire hand to be removed, which may cause other players to have less than x hands, but I'm ok with that.
Ganadai
 
Posts: 12
Joined: Tue Nov 03, 2009 8:11 am

Re: Purge players with less than x hands

Postby WhiteRider » Wed Jan 13, 2010 7:18 am

The problem is that when you remove a certain hand for a player and it is removed for all other players that affects the session totals for the other players too, so the smallest unit that can be removed is a whole session.
If you were to remove all hands (and therefore sessions) of players with less than X hands you would lose a LOT of your own hands too.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Purge players with less than x hands

Postby Ganadai » Thu Jan 14, 2010 1:40 am

That make sense. In which case, how do you purge sessions with less than x hands?
Ganadai
 
Posts: 12
Joined: Tue Nov 03, 2009 8:11 am

Re: Purge players with less than x hands

Postby kraada » Thu Jan 14, 2010 9:45 am

Click Database --> Database Management, highlight your database and click Purge. Select the player with the most sessions in the find box, then scroll to the right in the Sessions window on the right and find the column labeled Hands. Click on it to sort until you see the sessions with the fewest hands listed at the top, then purge those sessions.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Purge players with less than x hands

Postby Ganadai » Thu Jan 14, 2010 12:09 pm

Thank you for the suggestion kraada. Unfortunitly there is no single person involved in the majority of the sessions I want to purge.
Ganadai
 
Posts: 12
Joined: Tue Nov 03, 2009 8:11 am

Re: Purge players with less than x hands

Postby kraada » Thu Jan 14, 2010 12:50 pm

Then start at the top and go through players? If they're sessions with only a few hands and people you've never seen before, once you find one session it will likely knock out 6-8 players, so it will probably take less time than you may think.

That said, purging is a fairly long process, so you may be better off exporting your hands, then selectively reimporting, depending on the size of your database.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 29 guests

cron