Type:
Task
Priority:
Trivial
Resolution:
Duplicate
Fix Version/s:
None
Component/s:
None
Hi guys, very nice job with query_cache_information plugin!!!
Could we add some things?
--------
1) more columns... "table, rows, query_id, insert method, hits"
a)tables from one query cache row
maybe something like "database1.table_a, database2.tableb"
database + "." + table name
or maybe a separate table just for this? read (2)
b)show how many rows in query entry
this help to optimize app thinks like...
SELECT * FROM table WHERE ....
SELECT rows FROM query_cache_information WHERE statment_text="SELECT * FROM table WHERE "...
IF return 0 rows
SELECT COUNT(*) FROM table WHERE ...
c)show query entry id like "primary key" of query_cache_information
with this we can:
delete from query_cache_information where query_id = "some_query_key"
d)'insert method' => 'SQL_CACHE' or 'ALL'
e)hits
ok here we will lose some memory per entry (ulong hits)
maybe will lose some time too, since we need to lock and unlock (i'm right?), like:
lock the entry
add +1 to hit var
unlock it
it's a good information to understand what query in a table have more or less 'hits'
maybe a switch or variable could change this feature on/off to avoid time lost
SET query_cache_entry_hit=ON or OFF
--------
2) get queries that have table "x", like
SELECT * FROM query_cache_information WHERE table like '%,x,%' or table like '%,x' or table like 'x,%' or table='x'
the problem is the table string, that can be 'x' or 'x, y' or 'y, x' or 'y, x, z' ...
i don't know if a table string is the better option, or maybe a subquery could do the job...
in this case we should have a table like:
database,table,query_id
and execute:
SELECT * FROM query_cache_information WHERE query_id IN (
SELECT query_id FROM query_cache_tables_query_information (or another table name)
WHERE database='y' AND table='x'
)
since query cache must remove a query that have some table when we do insert / update / delete
i think the new table is a better option than a text column for table name
--------
3) show tables that have query cache, like
SELECT * FROM query_cache_tables_information
should return: database,table,query_count
--------
4) remove a table from query cache
like when "INSERT INTO table", and query cache remove entries with that table
maybe via two options...
DELETE FROM query_cache_information WHERE table = xxx
or
DELETE FROM query_cache_table_information WHERE table = xxx
-------
that's all =)
{"report":{"fcp":761.2000000476837,"ttfb":133.10000014305115,"pageVisibility":"visible","entityId":24231,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"c8ab2694-769c-40b7-8866-c84379f72074","navigationType":0,"readyForUser":802,"redirectCount":0,"resourceLoadedEnd":818.2999999523163,"resourceLoadedStart":139.5,"resourceTiming":[{"duration":147.70000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":139.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":139.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":287.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":147.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":139.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":139.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":287.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":156.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":139.90000009536743,"connectEnd":139.90000009536743,"connectStart":139.90000009536743,"domainLookupEnd":139.90000009536743,"domainLookupStart":139.90000009536743,"fetchStart":139.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":139.90000009536743,"responseEnd":296.2000000476837,"responseStart":296.2000000476837,"secureConnectionStart":139.90000009536743},{"duration":224.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":140,"connectEnd":140,"connectStart":140,"domainLookupEnd":140,"domainLookupStart":140,"fetchStart":140,"redirectEnd":0,"redirectStart":0,"requestStart":140,"responseEnd":364.2999999523163,"responseStart":364.2999999523163,"secureConnectionStart":140},{"duration":228,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":140.10000014305115,"connectEnd":140.10000014305115,"connectStart":140.10000014305115,"domainLookupEnd":140.10000014305115,"domainLookupStart":140.10000014305115,"fetchStart":140.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":140.10000014305115,"responseEnd":368.10000014305115,"responseStart":368.10000014305115,"secureConnectionStart":140.10000014305115},{"duration":228.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":140.20000004768372,"connectEnd":140.20000004768372,"connectStart":140.20000004768372,"domainLookupEnd":140.20000004768372,"domainLookupStart":140.20000004768372,"fetchStart":140.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":140.20000004768372,"responseEnd":368.7999999523163,"responseStart":368.7999999523163,"secureConnectionStart":140.20000004768372},{"duration":229.70000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":140.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":140.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":370.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":229,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":140.40000009536743,"connectEnd":140.40000009536743,"connectStart":140.40000009536743,"domainLookupEnd":140.40000009536743,"domainLookupStart":140.40000009536743,"fetchStart":140.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":140.40000009536743,"responseEnd":369.40000009536743,"responseStart":369.40000009536743,"secureConnectionStart":140.40000009536743},{"duration":229.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":140.5,"connectEnd":140.5,"connectStart":140.5,"domainLookupEnd":140.5,"domainLookupStart":140.5,"fetchStart":140.5,"redirectEnd":0,"redirectStart":0,"requestStart":140.5,"responseEnd":370.10000014305115,"responseStart":370.10000014305115,"secureConnectionStart":140.5},{"duration":231.39999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":140.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":140.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":372,"responseStart":0,"secureConnectionStart":0},{"duration":231.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":140.70000004768372,"connectEnd":140.70000004768372,"connectStart":140.70000004768372,"domainLookupEnd":140.70000004768372,"domainLookupStart":140.70000004768372,"fetchStart":140.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":140.70000004768372,"responseEnd":372.2000000476837,"responseStart":372.2000000476837,"secureConnectionStart":140.70000004768372},{"duration":669.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":146.20000004768372,"connectEnd":146.20000004768372,"connectStart":146.20000004768372,"domainLookupEnd":146.20000004768372,"domainLookupStart":146.20000004768372,"fetchStart":146.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":146.20000004768372,"responseEnd":815.5,"responseStart":815.5,"secureConnectionStart":146.20000004768372},{"duration":672.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":146.20000004768372,"connectEnd":146.20000004768372,"connectStart":146.20000004768372,"domainLookupEnd":146.20000004768372,"domainLookupStart":146.20000004768372,"fetchStart":146.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":146.20000004768372,"responseEnd":818.2999999523163,"responseStart":818.2999999523163,"secureConnectionStart":146.20000004768372},{"duration":189.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":509.60000014305115,"connectEnd":509.60000014305115,"connectStart":509.60000014305115,"domainLookupEnd":509.60000014305115,"domainLookupStart":509.60000014305115,"fetchStart":509.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":509.60000014305115,"responseEnd":698.9000000953674,"responseStart":698.9000000953674,"secureConnectionStart":509.60000014305115}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":13,"responseStart":133,"responseEnd":142,"domLoading":136,"domInteractive":859,"domContentLoadedEventStart":859,"domContentLoadedEventEnd":900,"domComplete":1926,"loadEventStart":1926,"loadEventEnd":1928,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":841.9000000953674},{"name":"bigPipe.sidebar-id.end","time":842.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":842.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":845.1000001430511},{"name":"activityTabFullyLoaded","time":906.4000000953674}],"measures":[],"correlationId":"1329a30918f577","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":72,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}