The following expressions formatting options are not cacheable:
(1) Expressions that contain subquerys cannot be cached. Here's an example expression with a subquery:
exists (select 1 from cash_hand_player_statistics chps where chps.flg_hero and chps.id_hand = cash_hand_player_statistics.id_hand)
Subqueries cannot be cached because this type of query ties multiple database columns across different tables together, this would result in massive performance failures in even the smallest databases during import and cache updating that would negatively affect our users’ experience. If subqueries were cached then each time that a cached column that contained a subquery must be updated then the majority of the database would need to be re-read. This would have to occur for every player in the database, which would result in Cache performance that is too slow to be used in-game while playing. With a database as small as just 100 players this would require pulling the player statistics table 100 times that each cache update is required at the end of a hand. Theoretically this subquery may take only a millisecond per player; with 100 players that would add 100ms per hand during import which is a reasonable amount, with 10,000 players that would add 10 seconds per hand during import which is clearly an unreasonable option to consider.
PokerTracker 4 columns that contain subqueries are still permitted even though they cannot be cached, but you should expect the performance of any stat that needs a custom column that includes a subquery expression to perform as poorly as it did prior to the release of 4.11.
(2) A reference to cash_hand_summary can only be cached if there is also a reference to cash_hand_player_statistics.
(3) A reference to cash_hand_player_combinations can only be cached if there is also a reference to cash_hand_player_statistics.
(4) A reference to cash_limit can only be cached if there is also a reference to cash_hand_player_statistics.
(5) A reference to cash_table_session_summary can only be cached if there is also a reference to cash_hand_player_statistics.
Expression examples (2) - (5) cannot be cached because PokerTracker 4 must retain the ability to break cacheable stats down to each absolute position as well as in/out of position for post flop stats, by stake, and by date. If PokerTracker 4 does not have an explicit player_statistics reference, then the player_statistics table cannot be joined and this join is needed to determine the position stake and date details for the resulting stat.
This expression can be cached because it contains both cash_hand_summary and also cash_hand_player_statistics:
sum(if[cash_hand_player_statistics.flg_f_saw and cash_hand_summary.amt_mgr > 0, 1, 0])
This expression cannot be cached because it only contains cash_hand_summary without the necessary cash_hand_player_statistics column:
sum(if[cash_hand_summary.amt_mgr > 0, 1, 0])
(6) Any reference to lookup_positions. The lookup table cannot be used in the custom cache, direct tests on cash_hand_player_statistics.position should be used instead. PokerTracker 4’s developers are aware that this will require a little extra work to build EP and MP positions, but it is necessary for the stats to be able to work properly. Other lookup tables are acceptable, most notably lookup_actions_p, lookup_actions_f, lookup_actions_t, and lookup_actions_r.
(7) Tournament resulting stats such as ROI and ITM cannot be cached because only columns based on hands can be cached.
(8) Stats which are only used for grouping purposes to break reports down into multiple rows are not cached, these are commonly referred to as “Group By” stats. This category of stats are only designed for use in reports, they are not designed to be used within HUDs.