PDA

View Full Version : Deleting hands for good.



FabianW
03-16-2010, 08:24 PM
Hello HoldemManager-Team!

I run Windows on my Macbook and my harddrive is almost full, so I am looking for anything that I can delete to get some space on there..

I have been deleting hands from 2008 & 2009 from my HEM for a couple of days now, but it doesn't change how much space I have left on my harddrive, even though when I delete them from the "Hands" section, it says that it deletes them permanently.

Then, I noticed that my "Players" tab didn't decrease. So I checked on it and found so many players that were only involved in hands which I had already deleted..

Is there a way I can delete those hands from the previous years for good and have more space on my harddrive?

Thanks for your response,
Fabian

fozzy71
03-16-2010, 09:53 PM
What you are doing will save some hard drive space, but not huge amounts. The hand histories get deleted but they remain in the players tab and in the HUD because we have not yet added a cache rebuilder.

Try using a program like WinDirStat - Windows Directory Statistics (http://windirstat.info/) to see what is using the most space on that partition.

You could periodically compress your \HMArchive folder to save some room, using a program like 7Zip. Your \HMArchive is likely not in your \Holdem Manager directory. We normally suggest you use C:\HMArchive, but you may have put it anywhere.

To verify the location: Options > Configure Auto Import Folders > Edit > Archive Folder: ___________________

FAQ - Hold'em Manager Poker Tracking Software :: Warning: You have XXX Hand History Files in your Auto Import Folders (http://faq.holdemmanager.com/questions/119/Warning:+You+have+XXX+Hand+History+Files+in+your+A uto+Import+Folders)

The archive should be organized by \Month\DayOfMonth (example: D:\HMArchive\2009\07\31).



This is my typical suggestion for saving DB space and tuning up your DB:


Logging:

I would suggest you turn off logging on your new SQL installation as well as these other performance improvements in my signature - Top 10: HEM performance increase tips


To turn off logging, follow these instructions. This is the first thing I do anytime I install SQL for someone.

- Start > My Computer > Tools > Folder Options > View > UnCheck 'Hide Extensions for known file types' > OK

- C:\Program Files\PostgreSQL\data\postgresql.conf > Right-Click > Open With.. > NotePad > Check 'Always use this program'

- Scroll about half way down to ~Lines 245 - 260:

- The last line of this block of code, for the 'logging_collector', must be changed from On to Off.



------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

log_destination = 'stderr' # Valid values are combinations of
# stderr, csvlog, syslog and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.

# This is used when logging to stderr:
logging_collector = off # Enable capturing of stderr and csvlog


File > Save; File > Close

Start > Programs > PostgreSQL 8.3 > Reload Configuration.


- Start > My Computer > C:\Program Files\PostgreSQL\data\pg_log, or C:\Program Files (x86)\PostgreSQL\data\pg_log, if you have 64 bit Vista. Delete all files in that folder. And it might be a good idea to empty your recycle bin at that point, or use a 3rd party utility like CCleaner to clean up all your junk/temporary files. You want to do this before you get to the vacuum and defrag process.



Regarding database maintenance:

You should regularly purge mined hands in your database, after purge vacuum / full analyze the database via pgadmin.
FAQ - Hold'em Manager Poker Tracking Software :: Purge Hands from Database (http://faq.holdemmanager.com/questions/100/Purge+Hands+from+Database)
FAQ - Hold'em Manager Poker Tracking Software :: Purge Hands (http://faq.holdemmanager.com/questions/197/Purge+Hands)

Then you can vacuum/analyze - FAQ - Hold'em Manager Poker Tracking Software :: Vacuum Analyze Database (http://faq.holdemmanager.com/questions/88/Vacuum+Analyze+Database+#manual)

Before you defragment you should stop the PostgreSQL service:

Start > Programs > PostgreSQL 8.x > Stop Server

Use your favorite defrag tool. I recommend Smart Defrag.

After defrag I recommend you reboot your PC. If you need to access the DB before rebooting you can start the PostgreSQL service.

Start > Programs > PostgreSQL 8.x > Start Server

FabianW
03-17-2010, 10:04 PM
Thanks for your help!


I turned off logging now. What exactly will that change? Are hands no longer saved to my database now?


I also just purged a lot of hands and am now going to vacuum them, like it is described in the FAQ.
You mentioned defragmenting afterwards.. is this a necessary step? I will probably do it anyways, but was just wondering what that will do..

Again, thanks for all you help, as you can tell, I am not too good with computers, but your help makes it really easy!

morny
03-18-2010, 10:22 AM
Hi,

No PostgreSQL logs all the querys you run and these can get pretty big, its not necessary to have them on so turning them off should save a lot of space

De-fragmenting just re-orginises the database and makes it run better so it is advisable

FabianW
03-18-2010, 12:33 PM
Okay I defragmented it after doing all the steps you advised me too and it saved me over 600 MB! THANK YOU!