> Have you tried "explain"ing the two select to see where all the time is > being spent and how the queries are optimized?
Sorry, I should have included that in my detail. +-------+-------+---------------+---------+---------+-------+------+-------+ | table | type | possible_keys | key | key_len | ref | rows | Extra | +-------+-------+---------------+---------+---------+-------+------+-------+ | X | const | PRIMARY,p1 | PRIMARY | 4 | const | 1 | | +-------+-------+---------------+---------+---------+-------+------+-------+ This is the query that takes 200ms. It performs the same regardless of the particular table involved (all have a similar primary key), or the record fetched. +------+-------+----------------+----------------+---------+------+------+-- ----------+ | table| type | possible_keys | key | key_len | ref | rows | Extra | +------+-------+----------------+----------------+---------+------+------+-- ----------+ | X | range | ScheduledStart | ScheduledStart | 8 | NULL | 25 | where used | +------+-------+----------------+----------------+---------+------+------+-- ----------+ This is the query that takes less than 10ms. Performance should be worse than that above, but it is not. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php