While looking at the performance of multiple datafiles I noticed something kind of interesting. A query searching for a integer based PK value that had the value escaped with single quotes was faster then another lookup on a PK without the single quotes. That seemed a little counterintuitive… if anything I would expect escaping an integer to take a little longer. But because they were searching for different keys, its not really all that meaningful, but i thought I would try and see just how much of an impact quoting your integer will cause. So I used the same query tool I put together in perl to do the multi-datafile tests to run 2 queries searching for an integer PK.
See here:
mysql> select qryid, note, avg(averagequeryruntime), count(*), querytext from Logger_single group by qryid, note; …[Read more]