In the past, I was successful in storing (strongly) processed database query results in memcached, using recent updates to base tables (s) as part of the cache key. For MyISAM tables, this last modified time is available in SHOW TABLE STATUS . Unfortunately, this is usually NULL for InnoDB tables.
In MySQL 4.1, the ctime for InnoDB in the SHOW TABLE STATUS usually the actual last update time, but this is not like MySQL 5.1.
There is a DATETIME field in the table, but it is displayed only when the row has been changed - it cannot show the time to delete a row that no longer exists! So, I really can't use MAX(update_time) .
Here is a very difficult part. I have a number of lines that I read. Can I determine the state of the table, which does not depend on when the changes were actually applied?
My conclusion after some time working on this is that there will be no way to get this information as cheaply as possible. I'm probably going to cache the data until I expect the table to change (updated once a day), and let the query cache help where possible.
mysql innodb
David m
source share