Overview:
How do I check the total amount of hands in my database?
Solution:
To check the total amount of hands in your database, do the following:
Go to Start / All Programs / PostgreSQL 8.x / PG Admin III.
OR
Navigate to C:\Program Files\PostgreSQL\8.x\bin\ and click on the elephant icon called pgAdmin3.exe.
This should bring up the following screen:
1. In the Object browser field, double click on PostgreSQL Database Server 8.x. You will be prompted you for your password.
2. Enter your password. This is your password that you used when setting up PostgreSQL.
3. Expand the database folder and choose the applicable database (HoldemManager by default).
Note: You may see a popup window about database encoding and if so click on don't show this tip again and just click OK.
4. With the applicable database highlighted, go to Tools and select Query Tool.
You should see the screen above.
5. Type in the following in the text box in the top left: Select Count(*) from pokerhands as shown above.
6. On the menu, go to Query and select Execute or press the F5 button.
Note: You should then see a message in the bottom status bar saying that the Query is running. For a 3,000,000 database it takes around 2-3 minutes to run on an average computer. When the query is complete, it will display the number of hands in the Data Output tab in the Output pane.
Note: To see hands grouped by specific poker sites, run this query in the text box: SELECT pokersites.sitename,count(*) FROM pokerhands LEFT JOIN pokersites ON pokerhands.site_id = pokersites.site_id GROUP BY pokersites.sitename
Note: If you are only interested in the amount of datamined hands in your database, run this query in the text box: SELECT pokersites.sitename,count(*) FROM pokerhands LEFT JOIN pokersites ON pokerhands.site_id = pokersites.site_id WHERE pokerhands.pokerhand_id not in (select pokerhand_id from playerhandscashkeycolumns_hero) GROUP BY pokersites.sitename