Posts:
1,032
Registered:
Dec 16, 2001
From:
Powell, OH
Age:
37 Home page
Game database lookup performance
Posted:
May 4, 2005, 11:49 PM
Game database lookup performance has been getting slower and slower as I'm sure many of you have noticed.
I've spent a bit of time analyzing this trying to find solutions. I've found a few areas for improvement, but overall its simply due to the number of games stored now. I have tweaked mysql server parameters a bit, that might help.
But a bigger change was that I just deleted ALL games that players played against the computer. There is really no point in keeping these games that I could see, they aren't ever viewable, don't show up in stats or in the games history tool. By doing this I got rid of almost 1/2 of the games stored, so searches should be about twice as fast as before. (games deleted ~120,000, moves deleted ~3,300,000!)
I am still looking at another possible improvement that might be feasible, heres hoping
Posts:
1,032
Registered:
Dec 16, 2001
From:
Powell, OH
Age:
37 Home page
Re: Game database lookup performance
Posted:
May 9, 2005, 9:41 PM
Good news for the game database. Over the weekend I made a significant upgrade to the database and code that makes a pretty big improvement in performance. The details would probably bore most people, but basically data has been shifted around and restructured, so that the most common searches are optimized.
There are some searches that will still be slow, but most cases are quicker (searching for all pente games went from over a minute down to about 2 seconds)! However, I would not suggest searching for all pente games played at DSG, that will still take a long time, bizarre isn't it
Because of these optimizations, a few other things happened: 1. All game types are searchable now, including speed games separate from normal games. (Note however that poof-pente games will not display correctly yet if there are any poofs, thanks to watsu for pointing that out).
2. When trying to view additional matched games (like games 25-50), these will actually be displayed now. delgr pointed that one out. This was due to a bug in my own caching code, which is not needed anymore!
Now if I can just get some more money donated for that memory upgrade the game DB will be blistering fast!
Posts:
1,032
Registered:
Dec 16, 2001
From:
Powell, OH
Age:
37 Home page
Re: Game database lookup performance
Posted:
May 13, 2005, 10:57 PM
Well, it doesn't matter if you can find a good deal on memory. I don't own the computer pente.org runs on, I rent it and a network connection out for a monthly fee.
So, to get more memory I have to pay $125 to the company I rent from. I know, its sort of a ridiculous price, but that's the deal.