I'm currently fighting with MySQL. The following takes too long:
mysql> SELECT COUNT(id) FROM q_archive; +-----------+ | COUNT(id) | +-----------+ | 2738048 | +-----------+ 1 row in set (17.95 sec)
I would like it to take significantly less time, even with memcached being in use it gets hit too often. I've added an index to the table - but I didn't expect that to help, and I wasn't disappointed.
Ho hum.
Maybe another case where flat-files are best. Sure counting them would take a while, but once I've counted them I can just `cat sum`.
This is probably a case where tweaking memory of MySQL would help. But I'm fairly certain if I start messing with that I'll get into trouble with other parts of my site.
ObFilm: The Evil Dead
Tags: mysql, random 16 comments
Something is horribly wrong with your instance. Here is a comparable select from a database of mine.