roles/mariadb: Disable the query cache by default

It seems that the usefulness of the query cache is diminishing in
recent years. If your cache is large then the time taken to scan
the cache can be longer than the SQL query itself.

See: https://haydenjames.io/mysql-query-cache-size-performance/
This commit is contained in:
2020-12-29 11:07:33 +02:00
parent 67a18c4f49
commit 8ee52143fc
2 changed files with 6 additions and 4 deletions

View File

@ -23,4 +23,8 @@ mariadb_login_unix_socket: /var/run/mysqld/mysqld.sock
# default is 100 but the max I've seen used is 5, so let's reduce it
max_connections: 33
# disable the query cache by default
query_cache_size: 0
query_cache_type: 0
# vim: set ts=2 sw=2: