PDA

View Full Version : I'm importing a ton of hands and have a question..



akvsaq
04-02-2010, 11:00 PM
I imported about 2 million hands a week ago.

Right now, I'm in the middle of importing 3 more million hands.

After I'm done, should I vacuum or something? I have no idea. I don't think I ever vacuumed before. If I need to vacuum, how long will that take? Importing 3 mil hands takes about 24 hrs to complete and I don't want to wait several more days to vacuum unless it's necessary! lol

Basically, please tell me what I should do, if anything, after importing 5 mil hands.

fozzy71
04-02-2010, 11:10 PM
You should vacuum every time you bulk import or purge hands, in addition to regular maintenance.

1 - Close HM and Open PGAdmin

2 - connect to postgresql server and then to the DB. Password is postgrespass in case you ever need it.

3 - Right-Click > Maintenance on the DB.

4 - Vacuum, Full, Analyze > OK

Wait for it to finish and change the greyed out OK button to a Done button.

Do that ever 10 -30k hands.

Every 50 - 100k hands, after finishing the steps above:


A - Right-Click > Maintenance on the DB.

B - Reindex > OK

Wait for it to finish and change the greyed out OK button to a Done button.



Next we need to Stop the PostgreSQL service so the Defragmenter can Defrag the Database.

Start > Programs > PostgreSQL 8,4 > Stop Server


Open Smart Defrag > Select both drive letter checkboxes > Analyze

Pick suggested Defrag process > Start Defrag



After Smart Defrag finishes you should restart your computer.

If you need to use HM before you restart your PC, then you need to Start Server.

Start > Programs > PostgreSQL 8,4 > Start Server

akvsaq
04-03-2010, 12:59 AM
Fozzy,

I'm using postgreSQL 8.3. I didn't want to upgrade to 8.4 because I do not want to go through the hassle of re-importing my 5 mil+ hands! That said, I'm not clear on some of your instructions.

Questions:

1) After I connect, I see that I have 3 databases. (They are called 'HoldemManager', 'HoldemManager2', and 'postgres'.) I am currently importing 3 million hands as we speak and on the top of HM, I see
'DATABASE: HoldemManager2' ----> I assume THIS is the database I need to choose? Or is it 'postgres'?

2) When I start the vacuum, the boxes I should check are FULL, ANALYZE, but not FREEZE. correct?

3) In the future, after every 10-30K hands, I should always do a FULL vacuum or just check the ANALYZE box only?

4) I do NOT see a smart defrag option in postgreSQL 8.3. What shall I do?

5) What is the estimated time for vacuum, reindex, and defrag for a database of my size? I don't have to do all of them at once do I? Can i just do vacuum one night, reindex the next night, etc..? Otherwise, it seems I won't be able to play poker for several days!

netsrak
04-03-2010, 06:46 AM
1. You need to choose the database you are connection to via Holdemmanager (see it in the Holdemmanager database management). Postgres is a system database, don't touch it.

2. Choose vacuum and full. freeze is according to the help obsolete.

3. Always do a vacuum full

4. Smart defrag is another program, you can use every defrag program. This is not related to postgresql.

5. Especially for the first time it will take some hours. But it is no problem to run the steps independent from each other. In night 1 you run the vacuum/full, in night 2 the reindex and in night 3 the defrag.