I have a MySQL database with 15 tables. Three of them are used for website authentication and three other are tables that are frequently read and written to. Then other tables are set in stone and I'd never need to change them unless I make some significant changes to the web app.
Is there anything I can do to make my database more efficient and for performance, given that I don't need to write to these tables at runtime?
From Googling, I was able to see some settings for MyISAM, but would prefer to stick with InnoDB. Couldn't find any other info other than certain people having their entire database as read only. However, mine has some tables that I'd need to read/write.
EDIT:
Four tables are 4MB and below and one is 7.55MB. Also wouldn't I then need to adjust all my procedures to check whether the table in memory exists or not? Cause it may disappear when the instance is restarted or something.
Best Answer
Short answer: You are making unnecessary work for yourself. Use InnoDB for everything. Forget about "readonly".
Long answer:
Bottom line...
key_buffer_size
to 20M only because some system tables use that engine.innodb_buffer_pool_size
to 70% of RAM (or a smaller percentage if you have less than 4GB of RAM).