Query Cache vs. MEMORY -stored table

696 Views Asked by At

I plan to optimize the performance of my web application with data caching. It uses MySQL so the options I found so far are these 2:

  • use MySQL query cache feature
  • make a table using memory storage engine and keep in it the full result of queries as serialized arrays;

I would prefer the second one, since there is only a table I need to cache, and the query cache on table modification invalidates all queries derived from that table at once. While in my memory table I can delete only the rows that have been modified (UPDATED). Course this will require more bits of code, but I guess the overall performance would be better.

What do you recommend and why?

1

There are 1 best solutions below

2
On

Make a table using memory storage engine and keep in it the full result of queries as serialized arrays;

  • 1) You mean session # use Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker
  • 2) You mean query cache#

see this

hope its help you to make fast web application