PDA

View Full Version : Purging observed hand histories



Posiedon
09-22-2011, 02:48 PM
My database was increasing at a very high rate because i import datamined hh's every day.The problem is that i have a small 160gb hdd divided into 4 sections of 40gb each and an external drive of 500gb.My C drive was almost full today (40gb total size) with hm/archive of 1.8gb and postgresql folder of 9gb.Reading the faq i did the vacuum and reindex steps and also deleted the files inside the data/pg_log folder.That brought down the size of posgresql to 5gb so now i have just 4gb left in my C drive.If i am not mistaken then purging observed hh's will keep the stats of players intact but delete the hh so i cant view them later or play them in the replayer.So i am thinking of purging all my observed hh's.How much space will that clear up????I have a total of 1.1 million hands out of which 1 million hands are datamined.Also my E drive has over 25gb free.So is it ok if i create a new database there and continue without having to purge hh's???If yes then whats the procedure for creating a new database and thereby having 2 databases in total???

Thanks in advance.

fozzy71
09-22-2011, 09:10 PM
My database was increasing at a very high rate because i import datamined hh's every day.The problem is that i have a small 160gb hdd divided into 4 sections of 40gb each

Any reason in particular why you did this? I would suggest you keep it as all one partition and this would not be an issue.

I have a 160gb SSD with 100gb free.



and an external drive of 500gb.My C drive was almost full today (40gb total size) with hm/archive of 1.8gb

Move (Cut/paste) the C:\HMArchive folder to one of the other partitions and change the Options > Configure Auto Import Folders...


postgresql folder of 9gb.Reading the faq i did the vacuum and reindex steps and also deleted the files inside the data/pg_log folder.That brought down the size of posgresql to 5gb so now i have just 4gb left in my C drive.If i am not mistaken then purging observed hh's will keep the stats of players intact but delete the hh so i cant view them later or play them in the replayer.So i am thinking of purging all my observed hh's.How much space will that clear up????

I am not sure how much space it will gain/save you. In my experience, an average HM1 database is ~10gb per 1 million hands.

HM2 databases are significantly smaller but organized differently (the database is split between \postgresql as well as your \user directory).

There are two types of purges (delete)

-options--> settings--> purge hands (will delete handhistory, hand from graph, $Won from sessions, etc. everything, so hand won't be used anymore for stats)
-options--> settings--> observed HH configuration--> purge hands--> will delete the handhistory and therefore the ability to replay the hand, but the hand will still be used for the graph, $Won from sessions and for the HUD.

If you're deleting a lot of hands, it's usually best to just create a new empty database.



I have a total of 1.1 million hands out of which 1 million hands are datamined.Also my E drive has over 25gb free.So is it ok if i create a new database there and continue without having to purge hh's???If yes then whats the procedure for creating a new database and thereby having 2 databases in total???

If you are going to keep the 4 partitions on the SSD then I would suggest you move your postgresql \data folder to one of the partitions without windows on it. Moving the database is not without risk so make sure you backup everything first. If moving the database does not work it might be possible to reinstall postgresql to the other partition and save the database. Worst case scenario is you have to reinstall completely to the new partition and start a new database then restore your backup via pgadmin or manually reimport all the original/exported files.


Move \data folder without reinstalling postgresql: http://faq.holdemmanager.com/questions/368/Move+Database+to+Another+Hard+Drive+or+Partition


Backup database, and everything manually:

Manual database backup/restore via pgadmin - http://faq.holdemmanager.com/questions/72/Backup+%26+Restore+Database

Export your Hand Histories
http://faq.holdemmanager.com/questions/98/How+to+Import+%26+Export+Hands

Export Your Notes
http://faq.holdemmanager.com/images/notes-02.jpg

Export Your Bonuses and Rakeback – Options > Rakeback & Bonuses http://faq.holdemmanager.com/images/rakeback-bonuses-01.jpg

Export any tourney summaries by selecting all your tournaments in the Data View Sub-Tab of the Tourney > Results Menu and choose Export Tourney Results and summaries

http://faq.holdemmanager.com/images/tourney-data-view-01.jpg

Then can you create a new database http://faq.holdemmanager.com/questions/75/Create+%7B47%7D+Delete+Database

Finally reimport all your hands/notes/summaries into the new database


This is why regular backups are a good idea. If your database becomes corrupt you can restore a backup and only have to import the most recent hands (that were played after the backup was created).


We have a backup and restore feature within Holdem Manager that makes it easy for you to backup all your settings, hand histories and files, but this only works if everything is installed on the C:\ drive.

http://faq.holdemmanager.com/questions/418/Backup+%26+Restore


If that does not work for some reason, the following steps might work to let you reinstall postgresql and point to the new location of the \data folder:

For reinstalling SQL to the same DB, follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) If you are moving the DB to a different drive/partition, manually cut or copy the \Postgresql\8.x\data directory to it's new location.
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install the same version of PostgreSQL as your current DB using these instructions - http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database
6) If you have moved/installed your DB to a non-default location, please make sure to change the 'Data Directory' path during the installation.