Not the answer you need?
Register and ask your own question!

caching table

georgenightgeorgenight EntrantCurrent User Role Beginner

Comments

  • dim0dim0 Percona Percona Staff Role
    Hi,

    What type of storage engine have you chosen for those tables? Depending storage engine you can have multiple options to try and improve your performance.

    Kind regards,

    Dim0
  • niljoshiniljoshi MySQL Sage Inactive User Role Beginner
    Hi,

    If you are using InnoDB and if table is small enough to fit in the memory/buffer pool then whenever you select, the table data will be stored in buffer only. So If InnoDB buffer pool set big enough then frequently used tables will be always resides in buffer pool and no need to read from disk every time which will be improve the performance. But there is nothing you can do to force this table to stay in memory if there are other actively used tables and there is not enough RAM space to keep them all.

    You can get more information here http://www.mysqlperformanceblog.com/2010/12/09/how-well-does-your-table-fits-in-innodb-buffer-pool/

    In case of MyISAM tables , it's different. There is no cache in MySQL for data, only indexes can be cached in MyISAM. and OS filecache is used for caching MyISAM tables. so if you have large myisam tables and you read them - they will be cached in filesystem cache for further speeding the reads. Caching for MyISAM is less intelligent, whole tables only if they fit in memory.

    There are also couple of more options for caching like Query Cache and Memcached. Query cache is very simple but only efficient solution if you have exactly the same query repeating many times, and you don't change your data too often. You can get more information here.
  • georgenightgeorgenight Entrant Current User Role Beginner
    storage engine is InnoDB
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.