cleaning my database
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Sep 2008
    Posts
    33

    Default cleaning my database

    Hi,

    my database size is getting out of hand, so I would like to delete all observed hands that are older than 3 months. Can someone guide me how to do that pls?

    Regards,
    Michal

  2. #2
    *** HM3! *** fozzy71's Avatar
    Join Date
    Jun 2005
    Location
    HM Support
    Posts
    32,814

    Default

    You should regularly purge mined hands in your databas:
    http://www.holdemmanager.net/faq/afm...aspx?faqid=107


    I would also suggest you turn off logging and delete all your old logs. They often take up a large portion of your DB size.

    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.


    HTML Code:
    ------------------------------------------------------------------------------
    # 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.


    After you purge and delete your log files, vacuum / full analyze the database via pgadmin.

    http://www.holdemmanager.net/faq/afm...aspx?faqid=163



    and check the performance tips from the link in my signature.

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    1

    Default

    Hi,

    I am also searching for this important code for deleting the database,and here I got that very well..I have applied that,It works nice.That helps me a lot.Thank you so much for sharing this post with that code and related information..

  4. #4
    Member
    Join Date
    Sep 2008
    Posts
    33

    Default

    Thanks a lot Fozzy.

Similar Threads

  1. Forgot password for manual database vacuum cleaning
    By jrfrank08 in forum Manager General
    Replies: 1
    Last Post: 10-30-2009, 01:25 AM
  2. I need HEM database cleaning help.
    By yesright in forum Manager General
    Replies: 3
    Last Post: 08-18-2009, 12:41 AM
  3. Replies: 1
    Last Post: 06-16-2009, 01:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •