R
R
Roman Dershavin2021-10-16 18:22:19
MySQL
Roman Dershavin, 2021-10-16 18:22:19

How to do query caching in Mysql 8?

I know the query_cache_size feature is missing in mysql 8. Any options to include or alternatives?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Slava Rozhnev, 2021-10-16
@rozhnev

Redis - after executing the request, we write it to Redis in the form:
key - request hash
value - serialized response of the database data
lifetime - data validity time
At each new request, we first check Redisku. Found - we return from the cache, no - we climb into the database and cache the result

A
Alexander Karabanov, 2021-10-17
@karabanov

query_cache was removed for a reason. This functionality is crookedly written, in particular, there is a lock - instead of speeding up, you will get a slowdown due to locks.

I
Ipatiev, 2021-10-16
@Fockker

The only alternative is to use MariaDB.

L
Lazy @BojackHorseman MySQL, 2021-10-16
Tag

third party utility. which one do you like better. wrapper over the db driver on the client

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question