a multiplayer game of parenting and civilization building
You are not logged in.
Pages: 1
MySQL is a little weird sometimes in terms of how it decides to execute queries. Sometimes, when a table grows in size, there's a flip point where MySQL will change its query execution plan. Usually, this makes sense and is more efficient, but sometimes, it's disastrous.
Today, as the life and user table grew in size, MySQL did one of these plan changes, and suddenly, the front page of the family tree server was taking 600 seconds to load.
Of course, this stalled the whole thing, and a bunch of lives were NOT logged there during this outage. So you will see a bunch of "mother still living" messages in the family trees today.
I've fixed it by manually forcing MySQL's query execution plan, which brings the execution time for these queries down from 600 seconds to a few milliseconds.
Anyway, sorry for the trouble, but it's fixed now.
It had worked for 20 months without ever having this problem.....
Offline
No problems Jason. I know this kind of "fun" from firsthand experience. It happens with all SQL engines; that's why they all allow some sort of hints to try to mitigate the problem. It's pretty much impossible to predict ahead of time which SQL statement might cause a bad plan, so you are forced to simply react when it does happen.
Offline
Yes, it has happened a few times over the life of the family tree server. As the tables grow in size, suddenly some query that was fine before ends up scanning the whole table instead of using the most obvious index. Then I have to go in there, figure out what's wrong, and add a hint to the query.
Offline
Pages: 1