Closed Djuke closed 5 months ago
Hi @Djuke,
this is expected behavior, same digests doesn't mean same queries. Query cache is only hit when the same exact query that matched the query rule is executed again, each of those queries generate different cache entries. Consider the simple cases of SELECT 1
and SELECT 2
, both generates identical digests SELECT ?
, yet, you wouldn't want to swap the resultset of one for the other.
Hope this clarifies the doubts about this behavior. Regards, Javier.
Hi @Djuke,
I'm closing this issue due to inactivity and because it was expected behavior. Please feel free to comment on it if you still have doubts.
Regards, Javier.
Hello,
I've just started using ProxySQL and in some of our queries we add a traceparent as a comment. When executing the same query but with a different traceparent the query cache is not being used, rather the
count_star
of the same query digest in thestats_mysql_query_digest
is bumped ofhostgroup
> -1. This is not specific due to a traceparent that we add, but if the query is the same and the comment is different you'll see the same result in thestats_mysql_query_digest
.Running the exact same query twice will cache the query with the correct mysql query rule
results in
The running the same query with a comment (within the cache time frame)
result in
I would expect for the last query to also hit the cache because the query digest is the same.