Manual:Querycache table

From MediaWiki.org
Jump to: navigation, search

Other languages:
English • ‎español • ‎日本語 • ‎polski
Manual:ContentsManual:Contents MediaWiki database layoutManual:Database layout querycache table


The querycache table is used for caching expensive grouped queries.

Fields[edit | edit source]

qc_type[edit | edit source]

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

qc_value[edit | edit source]

Some sort of stored value. Sizes, counts...

qc_namespace[edit | edit source]

Target namespace. Used in conjunction with gc_title.

qc_title[edit | edit source]

Target title. Used in conjunction with gc_namespace.

Versions[edit | edit source]

MediaWiki versions: 1.19 – 1.20
mysql> describe querycache;
+--------------+------------------+------+-----+---------+-------+
| Field        | Type             | Null | Key | Default | Extra |
+--------------+------------------+------+-----+---------+-------+
| qc_type      | varbinary(32)    | NO   | MUL | NULL    |       |
| qc_value     | int(10) unsigned | NO   |     | 0       |       |
| qc_namespace | int(11)          | NO   |     | 0       |       |
| qc_title     | varbinary(255)   | NO   |     |         |       |
+--------------+------------------+------+-----+---------+-------+


MediaWiki version: 1.18

describe querycache;

+--------------+----------------------+------+-----+---------+-------+
| Field        | Type                 | Null | Key | Default | Extra |
+--------------+----------------------+------+-----+---------+-------+
| qc_type      | varbinary(32)        |      | MUL |         |       |
| qc_value     | int(10) unsigned     |      |     | 0       |       |
| qc_namespace | tinyint(11) unsigned |      |     | 0       |       |
| qc_title     | varchar(255)         |      |     |         |       |
+--------------+----------------------+------+-----+---------+-------+

describe querycache; in MediaWiki 1.8 gives the following:

MediaWiki version: 1.8
+--------------+-----------------+------+-----+---------+-------+
| Field        | Type            | Null | Key | Default | Extra |
+--------------+-----------------+------+-----+---------+-------+
| qc_type      | char(32)        | NO   | MUL | NULL    |       |
| qc_value     | int(5) unsigned | NO   |     | 0       |       |
| qc_namespace | int(11)         | NO   |     | 0       |       |
| qc_title     | char(255)       | NO   |     | NULL    |       |
+--------------+-----------------+------+-----+---------+-------+


MediaWiki version: 1.9
+--------------+-----------------+------+-----+---------+-------+
| Field        | Type            | Null | Key | Default | Extra |
+--------------+-----------------+------+-----+---------+-------+
| qc_type      | char(32)        | NO   | MUL | NULL    |       |
| qc_value     | int(5) unsigned | NO   |     | 0       |       |
| qc_namespace | int(11)         | NO   |     | 0       |       |
| qc_title     | char(255)       | NO   |     | NULL    |       |
+--------------+-----------------+------+-----+---------+-------+


MediaWiki version: 1.11
+--------------+------------------+------+-----+---------+-------+
| Field        | Type             | Null | Key | Default | Extra |
+--------------+------------------+------+-----+---------+-------+
| qc_type      | varbinary(32)    | NO   | MUL | NULL    |       |
| qc_value     | int(10) unsigned | NO   |     | 0       |       |
| qc_namespace | int(11)          | NO   |     | 0       |       |
| qc_title     | varchar(255)     | NO   |     | NULL    |       |
+--------------+------------------+------+-----+---------+-------+


MediaWiki version: 1.12
+--------------+-----------------+------+-----+---------+-------+
| Field        | Type            | Null | Key | Default | Extra |
+--------------+-----------------+------+-----+---------+-------+
| qc_type      | char(32)        | NO   | MUL | NULL    |       |
| qc_value     | int(5) unsigned | NO   |     | 0       |       |
| qc_namespace | int(11)         | NO   |     | 0       |       |
| qc_title     | char(255)       | NO   |     | NULL    |       |
+--------------+-----------------+------+-----+---------+-------+
DatabasesManual:Database layout Engines: MySQLManual:MySQLOracleManual:OraclePostgreSQLManual:PostgreSQLSQLiteManual:SQLite
Technical documentation: SchemaManual:Database layout (tablesCategory:MediaWiki database tables) – API property associationsAPI:Database field and API property associationsField prefixesDatabase field prefixesPrimary key storage in other fieldsManual:Primary key storage in other fieldsWikimedia extension tablesCategory:Wikimedia extension database tables
Configuration: SettingsManual:Configuration_settings#Database_settingsSharingManual:Shared database
Development: AccessManual:Database accessOptimizationDatabase optimizationPolicyDevelopment policy#Database_patchesUpdaterManual:DatabaseUpdater.phpExtension schema updatesManual:Hooks/LoadExtensionSchemaUpdatesPatch fileManual:SQL patch file
Core tables: archivecategorycategorylinkschange_tagconfigexternallinksfilearchivehitcounterimageimagelinksinterwikiiwlinksipblocksjobl10n_cachelanglinkslogginglog_searchmsg_resourcemsg_resource_linksmodule_depsobjectcacheoldimagepagepagelinkspage_propspage_restrictionsprotected_titlesquerycachequerycachetwoquerycache_inforecentchangesredirectrevisionsearchindexsitessite_statstag_summarytemplatelinkstexttranscacheupdateloguploadstashuseruser_former_groupsuser_groupsuser_newtalkuser_propertiesvalid_tagwatchlist