MySQL Forums
Forum List  »  Performance

Query Cache Aging
Posted by: Rob Heilman
Date: September 14, 2005 04:42PM

We have two linux hosts replicating data via PeerFS. Our SQL data is located on the PeerFS. When a record is updated at host1, the data is updated at host2. If query_cache is enabled on host2 and the query has already been cached, the cached query is not flushed on host2. I understand this to be the anticipated behavior as that the mysqld process was not made aware of the change, only the file system is aware of the change in data. I am referencing http://dev.mysql.com/doc/mysql/en/query-cache.html for my understanding of the expected behavior.

Is there a mechanism available that could limit the age of queries that are cached? I know there are a few work arounds: disable caching, enable the flush operative and tune & tune the time variable, setup a script that executes a RESET QUERY CACHE on a regular basis. (feel free to point out other options) However each of these have drawbacks.

I would like to propose that a query_cache_age_limit be added to allow for each record to be aged off individually based on a specific time limit. This would essentially mimic the TTL portion of DNS. If there is already such a feature please bop me in the head with a link so I may go eat some humble pie. If there is no such feature but this is the wrong place to make such a request please let me know.

Thanks,

rh

Options: ReplyQuote


Subject
Views
Written By
Posted
Query Cache Aging
1970
September 14, 2005 04:42PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.