How to combine cache with new data

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

How to combine cache with new data

Postby skyd1v3r » Mon Aug 03, 2009 8:00 am

Hello,

I am not sure if I got the right place to post this question, but since it´s SQL...
Please feel free to move it to wherever you belive it belongs to.

I am experimenting with SQL and the command-line-thing. But while I can both read the cache for speed, or fire the actual query for accuracy, I cannot combine both for speed and accuracy. I guess PT reads the cache first, and ther reads the new stats that are not yet in the cache. Is this approach closed-source, or is there some documentation?

Once it worked out, I´ll publish some of my work.

Thanks in advance.
skyd1v3r
 
Posts: 55
Joined: Wed Jun 10, 2009 8:24 pm

Re: How to combine cache with new data

Postby kraada » Mon Aug 03, 2009 8:40 am

You've got the right idea. The queries are dynamically generated so I can't actually explain how each query is going to work in complete detail, but the key piece of information that you are likely missing is that in the settings table, there are two key settings:
cache_update:holdem
and
cache_update:tourney_holdem

The former is the id_hand for the last hand that was included in the last cash games cache update, the latter is the id_hand for the last hand for the last hand that was included in the last tourney cache update. You should be able to use that value to get the proper values by summing the new data and adding the cache values.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: How to combine cache with new data

Postby skyd1v3r » Mon Aug 03, 2009 9:30 am

kraada wrote:... but the key piece of information that you are likely missing is that in the settings table, there are two key settings: cache_update:holdem and cache_update:tourney_holdem


That is exactly what I was looking for.
Thank you!
skyd1v3r
 
Posts: 55
Joined: Wed Jun 10, 2009 8:24 pm

Re: How to combine cache with new data

Postby kraada » Mon Aug 03, 2009 9:55 am

You're welcome :)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests