[MDEV-4904] Add query cache hit information to Percona Response time distribution plugin (MDEV-4568) Created: 2013-08-16  Updated: 2020-11-17

Status: Stalled
Project: MariaDB Server
Component/s: None
Fix Version/s: 10.4

Type: Task Priority: Minor
Reporter: roberto spadim Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 1
Labels: None

Attachments: Text File diff_10_0_4_query_response_time_plugin.cc     Text File diff_10_0_4_query_response_time_query.cc     Text File diff_10_0_4_query_response_time_query.h    
Issue Links:
Relates
relates to MDEV-4568 Port Percona response time distributi... Closed

 Description   

Include two new columns to QUERY_RESPONSE_TIME:
query_cache_count => number of queries returned from query cache
query_cache_total => query cache response time

the non query cache queries could be found as:
SELECT
time,
count,
total,
query_cache_count,
query_cache_total,
(count-query_cache_count) AS non_query_cache_count,
(total-query_cache_total) AS non_query_cache_total
FROM QUERY_RESPONSE_TIME



 Comments   
Comment by roberto spadim [ 2013-08-18 ]

MUST create unit test patch

Comment by roberto spadim [ 2013-08-18 ]

please change to TASK, it's not a BUG!

Comment by Sergey Vojtovich [ 2014-06-26 ]

rspadim Thanks for your contribution! I applied slightly modified patch to 10.1.
serg please review patch for this task if you like.

Comment by roberto spadim [ 2014-06-26 ]

=] you are wellcome guys =]

Comment by roberto spadim [ 2014-06-26 ]

with time, if you want to check MDEV-4682
i think it have all nice informations to explain how query cache is working (hits, response time etc etc)
i'm using for about one year , but it have only one design problem, maybe we should move the query cache hit code from sql_xxxx to sql_query_cache files

Comment by Sergey Vojtovich [ 2015-02-16 ]

Roberto,

what was the use case for this feature? Filtering out QC hits?

Comment by roberto spadim [ 2015-02-16 ]

For current mdev, know what was the exactly time take from standard queriess and query cached queriess, usefull to fine tune apps
Fornthe other mdev, know if a query cached is a good/bad cached query and agaim fine tune app and query cache use

Comment by Sergey Vojtovich [ 2015-02-16 ]

Quoting Sergei's review:

Queries served from qc don't take much time, which means that @@query_response_time_range_base should be different for them. Otherwise all qc hits will be in the first few slots. But a different base means a different table (QUERY_CACHE_RESPONSE_TIME ?) and a different set of configuration variables.

Isn't it the case?

Comment by roberto spadim [ 2015-02-16 ]

Well from my tests with a pentium 3 i got 30ms from query cache, the biggest qc return was 147 ms ,

Comment by roberto spadim [ 2015-06-23 ]

just to add a comment and a feature usefull..

when we restart the stats should be nice when it happened, maybe a status variable (show status) reporting the last flush could be very usefull to get informatino about "queries/second" (now-flush datetime)

Generated at Thu Feb 08 07:00:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.