[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/maintenance/archives/ -> patch-mimesearch-indexes.sql (source)

   1  -- Add indexes to the MIME types in image for use on Special:MIMEsearch,
   2  -- changes a query like
   3  --
   4  -- SELECT img_name FROM image WHERE img_major_mime = "image" AND img_minor_mime = "svg";
   5  -- from:
   6  -- +-------+------+---------------+------+---------+------+------+-------------+
   7  -- | table | type | possible_keys | key  | key_len | ref  | rows | Extra       |
   8  -- +-------+------+---------------+------+---------+------+------+-------------+
   9  -- | image | ALL  | NULL          | NULL |    NULL | NULL |  194 | Using where |
  10  -- +-------+------+---------------+------+---------+------+------+-------------+
  11  -- to:
  12  -- +-------+------+-------------------------------+----------------+---------+-------+------+-------------+
  13  -- | table | type | possible_keys                 | key            | key_len | ref   | rows | Extra       |
  14  -- +-------+------+-------------------------------+----------------+---------+-------+------+-------------+
  15  -- | image | ref  | img_major_mime,img_minor_mime | img_minor_mime |      32 | const |    4 | Using where |
  16  -- +-------+------+-------------------------------+----------------+---------+-------+------+-------------+
  17  
  18  ALTER TABLE /*$wgDBprefix*/image
  19      ADD INDEX img_major_mime (img_major_mime);
  20  ALTER TABLE /*$wgDBprefix*/image
  21      ADD INDEX img_minor_mime (img_minor_mime);
  22  


Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1