[MDEV-249] QUERY CACHE INFORMATION Created: 2012-05-04 Updated: 2013-05-24 Resolved: 2013-03-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | 5.5.31 |
| Type: | Task | Priority: | Minor |
| Reporter: | roberto spadim | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | plugins | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Hi guys, long time ago (2006) i request a feature at mysql dev team, and it was too easy that a 15old years guy done it |
| Comments |
| Comment by Sergei Golubchik [ 2012-05-10 ] |
|
I'll try to look at Roland Bouman's I_S plugin and see if we could bundle it |
| Comment by Oleksandr Byelkin [ 2012-06-20 ] |
|
The patch is, but fetching the table locks QC and so all queries on the server. In case of big QC or high rate of queries to the table it could be cause big performance problem. IMHO it should be mentioned some how so that people understand what they pay for the information. |
| Comment by Oleksandr Byelkin [ 2012-06-21 ] |
|
Lock time does not depend on connection speed, it depend on number of elements in the cache. For some big caches it could be huge performance impact (we specially made lock free switching off QC for that case). On the other hand there is no other way to get this information... Maybe we should require superuser privileges to access this table, to prevent DoS attack from normal user connection? |
| Comment by Oleksandr Byelkin [ 2012-06-21 ] |
|
1) there is no way to keep QC safe without the mutex lock (otherwise it will change under you feet), it is no good but design of the QC is very old and never changed. So All this require major or relatively big QC rewrite to be fixed (i.e. only can be done in some alpha). The real solution is to request superuser privileges for the table (IMHO it is not difficult, in worst case return empty table and lock nothing if it requested by non-privileged user). |
| Comment by roberto spadim [ 2012-09-12 ] |
|
is this request finished? |
| Comment by Sergei Golubchik [ 2012-09-12 ] |
|
not quite |
| Comment by roberto spadim [ 2013-03-27 ] |
|
\o/ finally done?!?! =D |
| Comment by Sergei Golubchik [ 2013-03-27 ] |
|
pushed in 5.5 branch, will be in 5.5.31 release |
| Comment by roberto spadim [ 2013-04-11 ] |
|
any idea when it's will be in mariadb 10.x? |
| Comment by Sergei Golubchik [ 2013-04-11 ] |
|
in 10.0.2 |
| Comment by roberto spadim [ 2013-05-23 ] |
|
i will test 5.5.31 as soon as possible |
| Comment by roberto spadim [ 2013-05-24 ] |
|
i have downloaded the 5.5.31 for windows, and didn't found the plugin for query cache information |
| Comment by roberto spadim [ 2013-05-24 ] |
|
sorry founded =) install plugin query_cache_info soname 'query_cache_info.dll' |
| Comment by roberto spadim [ 2013-05-24 ] |
|
uhm... some tests in windows, and it have some errors.. but it works sometimes SET global query_cache_size=0; EXECUTE SOME QUERIES..... (without use query cache) SELECT `STATEMENT_SCHEMA`, `STATEMENT_TEXT`, `RESULT_BLOCKS_COUNT`, `RESULT_BLOCKS_SIZE`, `RESULT_BLOCKS_SIZE_USED` FROM `information_schema`.`QUERY_CACHE_INFO` LIMIT 1000; "Variable_name" "Value" ====================================== ...execute some non cacheable queries.. SELECT * FROM `information_schema`.`QUERY_CACHE_INFO`; (RETURN 0 ROWS) ? ERROR (13) ON DELETE ? Qcache_queries_in_cache=0 ================================= Qcache_queries_in_cache=1 SELECT * FROM `information_schema`.`QUERY_CACHE_INFO`; "STATEMENT_SCHEMA" "STATEMENT_TEXT" "RESULT_BLOCKS_COUNT" "RESULT_BLOCKS_SIZE" "RESULT_BLOCKS_SIZE_USED" VERRRRRY NICE SHOW CREATE TABLE `information_schema`.`QUERY_CACHE_INFO`; i'm using heidisql and pressing f5 to reload the query cache information, i'm executing about 20 queries per second like show create table and select * from query cache, to get this error |
| Comment by roberto spadim [ 2013-05-24 ] |
|
only running very fast, i get the same error sql(6), errcode:13 show warnings |
| Comment by roberto spadim [ 2013-05-24 ] |
|
flush query cache; stop working... Qcache_queries_in_cache=1 |
| Comment by roberto spadim [ 2013-05-24 ] |
|
flush tables work Qcache_queries_in_cache=1 flush tables |
| Comment by roberto spadim [ 2013-05-24 ] |
|
DELETE FROM `QUERY_CACHE_INFO` WHERE `STATEMENT_SCHEMA`='information_schema' AND `STATEMENT_TEXT`='select SQL_CACHE * from test.a where b like \'ab%\'' AND `RESULT_BLOCKS_COUNT`=1 AND `RESULT_BLOCKS_SIZE`=23936 AND `RESULT_BLOCKS_SIZE_USED`=23935 LIMIT 1; don't work... but i think it will not work since delete isn't implemented well =) very nice job guys!!! |
| Comment by roberto spadim [ 2013-05-24 ] |
|
please disconsider this comments thanks! |