Current
| Archives
| Contact
Me
Related
Links | My
Personal Journal | Diaryland
�It's the little things you don't know� I've been reading High Performance MySQL, and it's a most excellent book. I've learned quite a bit, and only finished a few chapters so far. The bit that I learned the most from so far and made me stop and tell myself, "I should really be rethinking the ways I do some things," was that MySQL only uses one index per query (with the exception of a UNION, which uses one index for each component query in the UNION). It's a small detail, really, but a very, very important one that has escaped me until now, somehow. To me, that's counterintuitive, but to get the performance it does, it makes perfect sense. It explains why for many queries it's blindingly fast, like simple lookups, but for things where we're doing deeper data analysis and indexed things willy-nilly thinking, "who cares about space, we just want speed of access to our data," queries can still take some time. I have a lot of code to refactor. I'll get around to it someday, I'm sure. (Well, probably not.) Just a lesson learned, that I'm not sure whether I file under "stop assuming that everyone would implement the software this way," or alternately, file under "read the fucking manual for a change!"
|
||||||||||||
| ||||||||||||