Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    32

    Unanswered: When does MySQL query cache get flushed?

    Hi,

    Does query cache get flushed on any change in the table, or it gets flushed when there is change to only those record?

    I'm just thinking how useful is it for very large tables that are modified every few minutes.

    Thanks.

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    I think you are talking about the buffer cache and not the query cache. The query cache is a cache of the most recent SQL statements. These are never flushed to disk.

    The flushing of the buffer cache is not as important as flushing the buffer log. The buffer log keeps track of the updates performed on data in the database. The buffer log is used to recover the database in event of a failure i.e. when the buffer cache is not flushed to disk. There are 3 ways in InnoDB to flush the log buffer and this is controlled with the parameter innodb_flush_log_at_trx_commit.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •