So if you're running a server with 32GB of RAM and your entire database is 4GB, why can't the whole database just be kept in memory and be done with it?
I don't see an obvious way to do this in MySQL at least and it certainly doesn't do it automatically.