November 28, 2005

The Grasshopper Learns Another Lesson
After loading a fresh copy of the database, you must analyse the tables before MySQL will do anything remotely sensible with the indexes.
If you fail to do this... DOH!
(Visualise that "DOH!" in 40-foot-high flashing red neon, with searchlights and helicopters flying overhead and police cars and fire engines and so on and so forth.)
Posted by: Pixy Misa at 05:08 PM | Comments (10) | Add Comment | Trackbacks (Suck)
1
Consider it so visualised
Posted by: Rob at November 28, 2005 07:34 PM (9UJHr)
2
We were having a real issue with the performance of the MT trackback script - it was chewing up 200MB of memory at a time and taking several seconds to run. Not when someone sent us a trackback, but when someone looked up the trackbacks for a particular post.
I was wondering how MT could possibly be screwed up so badly, even if we are stuck on an old version. Turns out that it wasn't MT at all, but MySQL. When we moved servers, it lost all its statistics on the indexes, so it stopped using them! (Insert as many exclamation marks here as you see fit. I think that three or four dozen should do.)
I ran a table analysis, and the problem simply went away. Of course, I didn't work that out directly. It was only when my standard index page in Minx went from taking 0.01 seconds to 3.5 seconds that I really started to look at the database.
Now the only really poopy thing left with MT is the search script, which I may be forced to drag out behind the barn and shoot.
I was wondering how MT could possibly be screwed up so badly, even if we are stuck on an old version. Turns out that it wasn't MT at all, but MySQL. When we moved servers, it lost all its statistics on the indexes, so it stopped using them! (Insert as many exclamation marks here as you see fit. I think that three or four dozen should do.)
I ran a table analysis, and the problem simply went away. Of course, I didn't work that out directly. It was only when my standard index page in Minx went from taking 0.01 seconds to 3.5 seconds that I really started to look at the database.
Now the only really poopy thing left with MT is the search script, which I may be forced to drag out behind the barn and shoot.
Posted by: Pixy Misa at November 28, 2005 08:21 PM (3FPsg)
3
Oh yeah.
I realised that this was the problem with the trackback script just as I got to that point in the post. Hence the neon lights, fire engines, etc.
I realised that this was the problem with the trackback script just as I got to that point in the post. Hence the neon lights, fire engines, etc.
Posted by: Pixy Misa at November 28, 2005 08:22 PM (3FPsg)
4
When you shoot it, make sure there are no witnesses.... 

Posted by: Susie at November 28, 2005 10:13 PM (a0oF7)
5
I can visualize it, even if I don't understand it.
Posted by: RP at November 29, 2005 07:29 AM (LlPKh)
6
That's why you should run MT on flatfile databases. No pesky index to think of!
Posted by: Jojo at November 29, 2005 11:30 AM (vlKqG)
7
I'm a duck. I'm supposed to understand this?
As previously mentioned: I like pie.
As previously mentioned: I like pie.
Posted by: Wonderduck at November 29, 2005 11:49 AM (mAAjO)
8
I understand pie. Mmm-mmm, pie!
Posted by: Wonderduck at November 29, 2005 11:50 AM (mAAjO)
Processing 0.0, elapsed 0.013 seconds.
16 queries taking 0.0102 seconds, 30 records returned.
Page size 10 kb.
Powered by Minx 0.8 beta.