[MDEV-4588] QUERY CACHE - Per table/database max queries in cache (using ALTER TABLE to set per table information) Created: 2013-05-27  Updated: 2014-09-22

Status: Open
Project: MariaDB Server
Component/s: Query Cache
Fix Version/s: None

Type: Task Priority: Trivial
Reporter: roberto spadim Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: querycache, querycache_insert

Issue Links:
Relates
relates to MDEV-6358 QUERY CACHE - Ignore Table List Open

 Description   

MAX QUERIES IN CACHE per table/database
some schemas/tables are log schemas, i don't need query cache there

1) a per database solution using alter table or 'black_list' variable per schema
add a black list per schema, maybe a variable could do this job:

SET GLOBAL query_cache_no_cache_db=xxxx,yyyy,zzzz
ALTER DATABASE xxxx 
    QUERY_CACHE_MAX_QUERIES=0 (maybe -1 or NULL = infinity?), 
    QUERY_CACHE_FULL=REMOVE/CANT_CACHE

2) a per table solution, maybe using alter table, or a global variable

SET GLOBAL query_cache_max_queries_per_table=0 - 9999999999999999 (maybe -1 or NULL = infity?)
ALTER TABLE all_tables_in_schema_xxx 
    QUERY_CACHE_MAX_QUERIES=0 - 999999999999999 (maybe -1 or NULL = infinity?), 
    QUERY_CACHE_FULL=REMOVE/CANT_CACHE
 
QUERY_CACHE_FULL
    REMOVE works like table cache (remove old table and add new one), 
    CANT_CACHE return "can't cache" and don't cache query


Generated at Thu Feb 08 06:57:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.