Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: 10.2
    • Component/s: None
    • Labels:
      None

      Description

      We could implement a black list to query cache

      SELECT * FROM schema.table
      

      an idea is a "mysql.query_cache_deny_tables" table with four columns:

      SCHEMA varchar(64), 
      TYPE enum ('=','LIKE')
      TABLE  varchar(255)
      PARTITION varchar(255)
      PRIMARY KEY (SCHEMA,TYPE,TABLE,PARTITION) BTREE (usefull with LIKE)
      

      we could check if table being cache is inside this table with 2 queries:
      1) type="="

      SELECT 1
      FROM mysql_query_cache_deny_tables 
      WHERE 
      SCHEMA="#table_schema#" AND 
      TYPE="=" AND 
      TABLE_LIKE IN ("#table_name#","") AND 
      PARTITION IN ("#partition#",'')
      LIMIT 1
      

      2) type="LIKE"

      SELECT 1 
      FROM mysql_query_cache_deny_tables 
      WHERE 
      SCHEMA="#table_schema#" AND 
      TYPE="LIKE" AND 
      "#table_name#" LIKE TABLE AND 
      "#partition_name#" LIKE PARTITION
      LIMIT 1
      

      if this query return any rows we discart the query cache
      table ="" => don't cache any table from this SCHEMA,
      partition ="" => table without partitions or all partitions of this table

      obvious more rows inside this table = slower query cache, must check what's fast, a "table "LIKE field, or a hash table with many "=" conditions and no "like" condition

      maybe we could add two others types: "!=" and "NOT LIKE"

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  rspadim roberto spadim
                • Votes:
                  1 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