[MDEV-4715] QUERY CACHE - Remote Query Cache Server Created: 2013-06-26 Updated: 2014-09-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Query Cache |
| Fix Version/s: | None |
| Type: | Task | Priority: | Trivial |
| Reporter: | roberto spadim | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | querycache | ||
| Issue Links: |
|
||||||||
| Description |
|
Using the idea of MDEV-4598, we could implement external query cache at mysql server side, this is very nice and i think it's better than client side instead of executing the query cache inside of only one mysql server machine, we will execute it in a "mysql cache server machine", and the mysql server machine will report to client the mysql result (like it do today) and to cache server. in this case we DON'T NEED to change mysql client protocol, but we will have two tcp/ip connections, one for client and other to cache server, maybe the network will be a problem now... but it's a nice solution... the api is near to MDEV-4598, but the query cache server don't need to check mysql server, it will only receive mysql server information... check: when mysql execute a query, it will change data or cache a result (if it have query cache), the point here is two functions: invalidate query cache and put query in cache the other part of the query cache server is retrieve queries in cache and send to client, but instead of mysql server < - > cache server, we will do it at mysql client < - > cache server and mysql client < - > mysql server --------
check that the tables_checksum is the main part here... and we don't know if mysql have partition or not, the cache server will always understand that we have parititions, in other words we always have db+table+partition information, when mysql server don't have partition, partition will be considered 0 or -1 i think that a nice 'checksum' could be: table checksum can be something about table create time or another thing like this (md5 of .frm file for example) in checksum we have the server start time, a server crash will invalidate the cache, i think it's a nice feature, but users will want a on/off switch here --------
check that in this case we could be mysql client, or mysql server ------
------ we can hash the server_id+sql_flags+sql text, and select a query cache using this hash function using qc_info.cc i found that qc normally take about 10us to found the query in query cache, and small queries expend >100us to execute, if we have a network that's slower than query expend time, maybe external query cache server is a waste of hardware, maybe in this case we could use local query cache + external query cache? a small query cache (100MB) at mysql server + a big query cache (16GB) in query cache server? |