Thank you for the link. I believe that is exactly where I read it before.
Another question I have is: Is it known how long such index/table will stay in memory? Will it be just decided by the part of the mysql managing InnoDB Buffer Pool, and is out of our control?
Is there a way to look into InnoDB Buffer Pool to see what is there?
I ask because we have a stored procedure which uses 2 tables. When I run it, it takes up to 1.5 seconds (depending on the input). However, if I SELECT COUNT() FROM A and SELECT COUNT() FROM B and then run it, it takes at most 0.25 seconds. I decided to schedule a cron job to run these selects once an hour. Is that too often? If my database is 20 GB and InnoDB Buffer Pool Size is 30 GB, can I assume that these tables will always stay in memory?
Thanks a lot!