PDA

View Full Version : Vacuum Database



Lawy
06-23-2009, 06:45 AM
Hi,

I have an issue with my HM which is taking to many storage on my computer. So I tried to vacuum it thanks to HM but it is not working, i don't know why.
So I tried to vacuum it thanks to postgresql III and I did what the FAQ said but it is like the vacuum never come to the end.

Do you know what can I do to free some storage?

Thanks

fozzy71
06-23-2009, 07:53 AM
What version of HEM are you using? and what site do you play on? You may want to upgrade to the latest beta, depending on those answers.


-You can use http://windirstat.info/ to help see what is taking up the majority of room on your PC

-I also use a program called CCleaner (http://www.ccleaner.com/)to clean temp files and other garbage from my PC

-Revo Uninstaller (http://www.revouninstaller.com/) will make it easy to remove any old/unnecessary programs and games from your PC.

-You can manually delete the extraneous PostgreSQL log files - C:\Program Files\PostgreSQL\8.x\data\pg_log. The SQL logging can be turned off by manually editing SQL config file. (see below)

-You should now try a vaccum/analyze again.

-The Vac/Analyze can take a few minutes to complete, depending on the size of your DB and how long it has been since the last one. When it starts it will grey out the 'OK' button. Just wait until the greyed out 'OK' changes to a 'Done' button.


Turning of logging in SQL:

1.) Find the 'redirect_stderr' value and change it to 'off', unless you have a specific reason for looking at log files. If you're like me, the HEM queries result it tons of log data being written out. I had 10MB being written out every 20 minutes. Not only does this eat up tons of disk space, but this will cause your system to be wasting time writing to disk for logs you'll likely never look at.

'redirect_stderr' was used in SQL 8.2 I believe. If you have 8.3 you will probably have to find this line, which was at ~line 240:


logging_collector = off # Enable capturing of stderr and csvlog

2.) Find your postgresql.conf file and open in notepad. Such as C:\Program Files\PostgreSQL\8.2\data

3.) Find the 'shared_buffers' value. The default value is comically low, but a good value is 1/4 of your total memory. I set mine to 768MB as I have 4GB of RAM (of which a little more than 3GB actually can be used in non 64-bit systems).

4.) Find the 'effective_cache_size' value. The default for this is also very low, but can be set to upward of 1/2 of your total memory. I set mine to 1536MB.

5.) Restart either your computer or the PostgreSQL process from Start -> Control Panel -> Administrative Tools -> Services.