title: Loading MySQL Table into Cache (and process data) vs constantly sending queries
body: <p>Im currently developing a Java Server Application which has a lot of tables with some data that is modified frequently. All of the data has to get often fully retrieved (to display it to the user or to index it). As MySQL queries seem to be expensive (and problematic because I need the data async) I came up with the idea of literally loading in the entire table as a local cache. That way I can index the data always from the local cache and I only need to send changes to the mysql. Fortunately the data is not that big so I dont have to worry about OutOfMemory Exceptions.</p>
  
  <p><strong>What is more efficient, repeatingly sending queries to MySQL or load all data in local cache to do operations?</strong></p>
  
  <p>Thanks for reading,
  Regards, Tech!</p>