[Maria-developers] RFC - query cache using storage engine
Hi guys, i was thinking about ideas for query cache... there's an mdev about partitioning query cache ( https://mariadb.atlassian.net/browse/MDEV-4454) instead of this, why not use a HEAP storage engine (with partitioning), or maybe a myisam or aria or innodb as "backend", and write a "frontend" (query cache) that execute commands over this storage engine? i'm talking about, changing the query/table/result blocks of query cache, to query/table/result tables when start mysqld truncate these tables when add new query "insert" to these tables when a table prune occur, "delete" from these tables when flush, optimize these tables when reset query cache, truncate this tables these tables could be at mysql schema, if they don't exists create as ENGINE=MEMORY for example since we must have a MAX SIZE for query cache, we could add a MAX SIZE for HEAP engine and a LOW MEMORY algorithm ( https://mariadb.atlassian.net/browse/MDEV-4675) at high level, what you think about this idea? -- Roberto Spadim
Hi, Roberto! 15.08.2013 08:25, Roberto Spadim пишет:
Hi guys, i was thinking about ideas for query cache...
there's an mdev about partitioning query cache ( https://mariadb.atlassian.net/browse/MDEV-4454)
instead of this, why not use a HEAP storage engine (with partitioning), or maybe a myisam or aria or innodb as "backend", and write a "frontend" (query cache) that execute commands over this storage engine?
i'm talking about, changing the query/table/result blocks of query cache, to query/table/result tables
when start mysqld truncate these tables when add new query "insert" to these tables when a table prune occur, "delete" from these tables when flush, optimize these tables when reset query cache, truncate this tables
these tables could be at mysql schema, if they don't exists create as ENGINE=MEMORY for example
since we must have a MAX SIZE for query cache, we could add a MAX SIZE for HEAP engine and a LOW MEMORY algorithm ( https://mariadb.atlassian.net/browse/MDEV-4675)
at high level, what you think about this idea?
What do you thing is a bottleneck of QC which we are trying to avoid with partitioning? [skip]
hi oleksandr! =) i'm not thinking, it's a open MDEV that i read and was thinking about it (i don't know why i was thinking about it kkkk, no work and free time =] ) but i was reading about memcached some months ago and there're some memcached daemons that runs on memory and disk, and since query cache is something like it (a cache), why not use the storage engine of mysql to put query cache? that's the point that i was asking my self about the bottleneck, i think it's something like a table lock, the query cache is locked and no one more can write to it, when two or more queries start writing to query cache the bottleneck is write to query cache, but i don't know internally hwo it's done, and i never see this problem in running servers, i don't know why should partition the query cache, maybe just for reduce locks? i know the query cache flow via debugger, i don't have an idea about how everything works in this scenario, there's some prunes, but i know what docs say and a little about i read at sql_cache.cc
reading the MDEV... "Make QC partition, i.e. many QC to avoid bottleneck of mutexes in it." it's something related to removing entries from cache? ie, rewriting the linked list of block memory?
participants (2)
-
Oleksandr Byelkin
-
Roberto Spadim