Store the database in memory. Makes it Really fast!
Filip Ekberg
2009-01-12 17:38:49
Are you using the right tool for your problem? MySQL is a relational database. It excels in queries that involve relations between columns. The type of query you describe does not make use of the database's strong points, and still pays its overheads. MySQL does not guarantee speed - it enables persistent storage with complex querying abilities, at a reasonable speed. Maybe you need a different data architecture. Or, if the query you describe is not representative, here is a book about mysql performance, and the respective blog.
Databases more often make the machine I/O bound.
If your machine is CPU bound, then I don't think the database is your bottleneck.