Database Management & Maintenance Guide

PokerTracker 3 version 3.10
October 25, 2013
  • Overview

    The central component of PokerTracker™ is the database. The PokerTracker™ development team spent an extraordinary amount of time analyzing, testing, and comparing several different database solutions. In the end, PostgreSQL was the clear winner. To ensure that PokerTracker™ is running efficiently, it is extremely important that you regularly maintain your database(s).

  • Database Management

    The PokerTracker 3 database was designed to handle millions of hands so there is no need to create multiple databases for certain sites, limits, etc. One large database should be all that is required. The only time that a second database would be needed is if you opt to store observed hand histories in one database and played hands in another database which is discussed further in the Played vs. Observed Hands section of this document.

     

    To manage your databases select Database in the main menu then Database Management. A new window will appear titled Database Management.

     

     

    • Setting the Active Database

      The Active database is the database that hands are imported into (unless otherwise specified) and the database that stats are retrieved from for viewing. To set the active database, select Database from the main menu, then select Set Active Database, and finally select the database name you want set as active. Another method to set the active database is to select it in the Database Management window and click the Set Active button.

    • Setting the Default Database

      The Default database is the database that is set as Active every time that you start PokerTracker. To set the default database, left click and select the database name in the Database Management window then click the Set Default button.

    • Adding a Database

       

      In the Database Management window, click the New button. Another window will appear titled Configure PostgreSQL Database. Enter the name you would like to refer to the database as. If you are adding an existing database, check This database already exists and click the Browse Databases link to select the existing database.

      The server, user, port, and password fields should not need to be changed. Do not change these values unless if you know what you are doing.
      Then click the Create button and PokerTracker will create the database. Once the created, you should receive a confirmation window stating that the database was successfully created.

       

    • Removing a Database

      When you remove a database, the database is simply unlinked from PokerTracker. The database is still in existence and you can re-add it back into PokerTracker at anytime by following the steps in Adding a Database. To remove a database, go to the Database Management window, left click to select the database then click the Remove button. You will be prompted to ensure that you want to remove the database. Click Yes and the database will be removed from the PokerTracker list.

    • Deleting a Database

      When you delete a database, the physical contents of the database are permanently deleted. Once deleted, there is no way to recover or restore the database. In the Database Management window, left click to select the database to delete then click Delete. You will be prompted to ensure that you want to permanently delete the database. Click Yes and the database will be permanently deleted.

    • Converting a PT2 Database

      To import a PokerTracker v2 PostgreSQL database to your active PokerTracker 3 database, click Databasein the main menu then go Convert and Convert PokerTracker 2 Database. A new window will appear that lists all of the PT2 databases on your computer. Select the PT2 database that you want converted to your active PT3 database and click OK. You will be prompted with a notice asking if you would like to continue. Click Yes. You can view the status of the conversion process via the Import tabs window.

       

      Note: Currently, you can only convert a PostgreSQL database and hands where the hand histories have been saved in the database. To convert an Access database, you should convert your PT2 Access database to PostgreSQL within PT2 then convert this database within PokerTracker 3 or export the hand histories from PT2 using Utilities -> Export Hand Histories to File.

  • Database Maintenance

    Routinely maintaining your PokerTracker database is the single most important thing that you can do to ensure that PokerTracker continues to run as efficiently and quickly as possible. Failing to properly maintain your database will lead to slow stat retrieval and general poor performance. At a minimum, you should analyze, cluster, and vacuum your database, and rebuild the cache at the recommended times mentioned below.

    It is also important to maintain your hard disk to achieve maximum performance. To run the Housekeeping functions optimally you should have at least as much free space on the disk as your database uses. Defragmenting your hard disk regularly will allow things to run faster too. You should close down all your applications and stop the PostgreSQL service before defragmenting:

    Start -> All Programs -> PostgreSQL 8.3 -> Stop Service 
    Start -> All Programs > Accessories -> System Tools -> Disk Defragmenter 

    You can run the Housekeeping functions either at the end of a Manual import or by selecting Database from the main menu and then Housekeeping.

     

     

     

    • Analyze

      When you analyze the database, PostgreSQL gathers important information about the database to optimize how your database is retrieved. At a minimum, you should analyze your database after every ten-thousand hands that you import. It is recommended to leave Analyze on Completion checked in your Manual Import windows so that the database is analyzed after every import. Otherwise, you can manually analyze the database via selecting Database in the main menu then selecting Housekeeping. The analyze process should not take very long to complete and is extremely beneficial.

       

       

    • Cluster

      Clustering your database is similar to defragmenting your hard drive but even more important as databases fragment much quicker. You should cluster your database after your first manual important and then cluster at a minimum, every 100,000 hands after that. Ideally, you should cluster every 50,000 hands; however, that may not be practical. To automatically cluster after a manual import check Cluster on Completion. To manually cluster your database, select Database in the main menu then select Housekeeping. The clustering process is much slower than analyzing and vacuuming. Depending on the speed of your computer and the size of your database, this process could take a few hours.

    • Update Cache

      Updating your database cache allows PokerTracker 3 to retrieve statistics much faster and will make a huge difference to the performance of both reports and the HUD. The cache update takes a similar amount of time as analyzing and should be done at least as often; preferably after about every ten thousand hands imported or sooner.

    • Vacuum

      Vacuuming your database reclaims free space on your hard drive after you delete data therefore it is only necessary to manually vacuum your database if you have deleted data. To vacuum your database, select Database in the main menu then select Vacuum Active Database. The vacuum process should not take very long to complete.

  • Multiple Databases

    The PokerTracker 3 database was designed to efficiently handle millions of hands therefore you should not create separate databases for different sites, limits, etc. The only scenario where it is useful to have two separate databases is when storing observed hands into one database and played hands into another database.

    • Played vs. Observed Hands

      Importing your observed hands into one database while importing your played hands into another database is useful for those users who datamine (gather hands from observed tables). Over time, you could then delete your observed database while keeping the played hand database intact. To choose which database your played and observed hands are imported into, go to the Import -> Auto Import -> Preferences tab. Choose each database from the pull down menu for the corresponding hands.

       

       

      Make sure that Import Observed Hands is checked so that PokerTracker imports your observed hand histories.