[MDEV-4676] QUERY CACHE - partition lock prune and invalidation query cache Created: 2013-06-18  Updated: 2014-09-22

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

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

Issue Links:
Blocks
is blocked by MDEV-3932 5.6 merge Closed
PartOf
includes MDEV-4689 QUERY CACHE - partition prune on upda... Open
Relates
relates to MDEV-6371 QUERY CACHE - Reaping Thread Open

 Description   

after MDEV-3932 mysql 5.6 merge

we will have partition lock prune, this is nice, but query cache need information about partition being used in update/delete to invalidade only queries that use the table + partition, not only the table
removing all queries without partition information reduce a lot query cache hits

i send a bug report to mysql at: http://bugs.mysql.com/bug.php?id=69501
to implement this at mysqld too

since we can have more than 8000 partitions, could be nice a query cache map in partition information, like

ALTER TABLE aaa PARTITION ppp 
  QUERY_CACHE_ID=1/SQL_NO_CACHE/NEW/PARTITION(pp1)

1 = an id to group partitions
SQL_NO_CACHE = don't cache this partition (redure memory use and query cache lowmem problem)
NEW = get the last id used and add +1
PARTITION(pp1) = get the same QUERY_CACHE_ID of PARTITION(pp1)

With this we could better remove queries from query cache when one partition or a group of partitions (with same QUERY_CACHE_ID) change, or dont cache some partitions (QUERY_CACHE_ID=SQL_NO_CACHE)

This change qc_info.cc plugin since we have a QUERY_CACHE_TABLE that have all tables used, we should add the PARTITION_QC_ID column to allow a better understand of what partition was used, (maybe set to NULL when table don't have partition)


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