updating database cache (a few misc questions)

General discussion of PokerTracker 3.

Moderator: Moderators

updating database cache (a few misc questions)

Postby rowhousepd » Thu Jul 29, 2010 1:22 am

1) I have a ~500k hand database that I purged a handful of sessions from (maybe ~300 hands at most). Afterwards, the cache status says it's at 0% -- is that possible? Zero?!? Would I need to run a housekeeping on that db to keep it running the fastest after such a small alteration, or would the difference really be negligible?

2) If you run housekeeping on a database, back it up, and later restore it, does you need to run another housekeeping to have it running a full speed? Ditto if you're backing up & restoring a db that has not been house-kept. I guess I'm asking if in the process of restoring a db it is also updating the cache, vacuuming, etc? (It's such a looong process & would love to avoid it if necessary the times I need to reinstall a db.)

3) Request: It would be great if there was a way to know many hands ago you ran housekeeping on a database for all of the non-cache related tasks (vacuuming, analyzing, & clustering). You're supposed to run them after 10k & 50k hands, but there's no way to tell how many hands you've imported since the last time. Perhaps there could be a housekeeping status display similar to the cache status. It would be nice to know whether a db really needs to be cleaned up before you have to wait for possibly hours for it to complete. Thanks.
rowhousepd
 
Posts: 329
Joined: Sun Mar 22, 2009 4:00 am
Location: Philadelphia, PA

Re: updating database cache (a few misc questions)

Postby WhiteRider » Thu Jul 29, 2010 3:07 am

1. When you remove hands the totals will no longer be correct, and they can't be corrected by "adding the new hands" (which is what Update Cache does) so you will need to Rebuild Cache in Database > Housekeeping.

2. Backing up and restoring a database will keep the cache intact.
I don't know for sure about clustering - I would expect a Restore would build a fairly efficient database since it can write all the data in one go so should get it in a pretty good state.

3. This has been requested before but I will remind the development team about it. The cache should be kept at 100% all the time, though - auto import will keep it updated incrementally and if you do a manual import you should Update Cache. Clustering isn't so critical to be kept absolutely up to date - just run it overnight once a month or whatever timescale roughly fits your import rate.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: updating database cache (a few misc questions)

Postby tarix » Thu Jul 29, 2010 3:33 am

WhiteRider wrote:2. Backing up and restoring a database will keep the cache intact.
I don't know for sure about clustering - I would expect a Restore would build a fairly efficient database since it can write all the data in one go so should get it in a pretty good state.


According to the PostgreSQL documentation, this is correct.

rowhousepd wrote:3) Request: It would be great if there was a way to know many hands ago you ran housekeeping on a database for all of the non-cache related tasks (vacuuming, analyzing, & clustering).


As a bit of aside, it never hurts to vacuum and analyze your database. If you do it on regular basis its generally quite fast.
tarix
Developer
 
Posts: 3760
Joined: Tue May 20, 2008 2:49 pm


Return to General [Read Only]

Who is online

Users browsing this forum: No registered users and 6 guests