in reply to Apache::DBI, DBI, DBD::MySql and MySQL cache?
What version of mysql are you using?
Starting in version 4.0.1 there is a "query cache"(1). You can see whether your mysql has this cache with the following query. (2)SHOW VARIABLES LIKE 'have_query_cache';
According to the Mysql manual page mysql keeps in this cache a table of queries and the corresponding results. When an identical query is received the results out of the cache are returned. This is what one would expect. There is a big note:
NOTE: The query cache does not return stale data. When data is modified, any relevant entries in the query cache are flushed.
I am not sure but I would assume that since the table is not modified and the query is not modified the result would come from the cache. You can turn off the cache using options in the select query as noted (here).
In Section Seekers of Perl Wisdom