User:RichMorin/mw querycache

Used for caching expensive grouped queries.


Inter-table Relationships

edit
  • qc_namespace - page namespace ( page.page_namespace)
  • qc_title - page title ( page.page_title)


MySQL Table Description

edit
mysql> desc mw_querycache;
+--------------+-----------------+------+-----+---------+-------+
| Field        | Type            | Null | Key | Default | Extra |
+--------------+-----------------+------+-----+---------+-------+
| qc_type      | char(32)        |      | MUL |         |       |
| qc_value     | int(5) unsigned |      |     | 0       |       |
| qc_namespace | int(11)         |      |     | 0       |       |
| qc_title     | char(255)       |      |     |         |       |
+--------------+-----------------+------+-----+---------+-------+
4 rows in set


Annotated Table Creation Code

edit
-- Used for caching expensive grouped queries

CREATE TABLE /*$wgDBprefix*/querycache (

  -- A key name, generally the base name of the special page.

  qc_type             char(32)                    NOT NULL,
  
  -- Some sort of stored value. Sizes, counts...

  qc_value            int(5)         unsigned     NOT NULL  default '0',
  
  -- Target namespace+title

  qc_namespace        int                         NOT NULL  default '0',
  qc_title            char(255)      binary       NOT NULL  default '',
  
KEY                   (qc_type, qc_value)

) ENGINE=InnoDB;