Change to “Player” Summary in next Poker Copilot update

Summary: as of the next update of Poker Copilot, the Player summary will only show players you’ve seen in the last 30 days. It will, however, show all-time data for those players. This fixes a bad performance problem.


Last year, while working on improvements for Poker Copilot 5, I found that the Player summary in Poker Copilot was not including all the data that it should be including. I modified it to make it more correct, but in the process it became slow. For a large database, with the date range set to “All time” it could take a minute or two.

The basic problem was this: you may have a million hands in your database, with up to 10 players per hand. We store these hands in a database table, one row per player per hand. That’s 10 million rows of data. To show you information for the players in your database, those 10 million rows need to be speedily read, filtered, summed, and sorted – all in a desktop app with an embedded database.

On a stand-alone, dedicated database server, you could simply give the database server a beefy CPU and plenty of memory, and the problem would go away. Give it enough RAM to hold the entire database to memory and you’ll get sub-second performance.

In a desktop app we can’t be so generous in using up all your computer’s memory. We can’t even assume that your computer has plenty of RAM (Although note: the best way to make Poker Copilot run faster is to increase your computer’s memory).

Another common solution is to use some summary tables prepared in advance. Poker Copilot offers arbitrary filtering on almost any conceivable characteristic of a hand, which means that for this particular screen we can’t have the data already summarised; we need to do it on demand.

So I’ve been thinking of changes I could make in Poker Copilot for a faster Player summary, while keeping it useful. One idea that kept running through my head is that you typically only care about the players you’ve seen in the last few days. In fact, mostly just the current session is important. For the players you’ve played against today, you want to see their all-time statistics. But for people you haven’t seen for weeks or months? Not important for improving your poker game.

It turns out that by filtering out all players who you haven’t seen in the last 30 days, we can filter and summarise those 10 million rows of information in your database in a few seconds. If you further restrict the date range of player data to, say, six months, and it is even faster, in many cases down to less than a second, which is usable performance, I think.