Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4676

QUERY CACHE - partition lock prune and invalidation query cache

    Details

      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)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  rspadim roberto spadim
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Time Tracking

                    Estimated:
                    Original Estimate - 10 weeks
                    10w
                    Remaining:
                    Remaining Estimate - 10 weeks
                    10w
                    Logged:
                    Time Spent - Not Specified
                    Not Specified