手册:Revision actor temp table

This page is a translated version of the page Manual:Revision actor temp table and the translation is 62% complete.
手册:索引 MediaWiki数据库布局 revision_actor_temp表
MediaWiki版本:
1.31 – 1.38

The revision_actor_temp table was a temporary table used for the actor migration (alongside with revision_comment_temp ), creating a relation between each row of the revision table and a row of the actor table. On large wikis like English Wikipedia, altering the revision table is a months-long process. This table was created so that other data migrations could be done while the alter was running. Once adding the rev_actor field to the revision table was done, the data from revision_actor_temp was merged back into the revision table and the table was deleted.

字段

revactor_rev

revision.rev_id的键

revactor_actor

actor.actor_id的键 Replaces revision.rev_user and revision.rev_user_text, will eventually be replaced by revision.rev_actor.

revactor_timestamp

重复revision.rev_timestamp,用于索引。

revactor_page

重复revision.rev_page,用于索引。

架构摘要

MediaWiki版本:
1.36 – 1.38

DESCRIBE revision_actor_temp;

+--------------------+---------------------+------+-----+----------------+-------+
| Field              | Type                | Null | Key | Default        | Extra |
+--------------------+---------------------+------+-----+----------------+-------+
| revactor_rev       | int(10) unsigned    | NO   | PRI | NULL           |       |
| revactor_actor     | bigint(20) unsigned | NO   | PRI | NULL           |       |
| revactor_timestamp | binary(14)          | NO   |     | NULL           |       |
| revactor_page      | int(10) unsigned    | NO   | MUL | NULL           |       |
+--------------------+---------------------+------+-----+----------------+-------+
MediaWiki版本:
1.31 – 1.35

DESCRIBE revision_actor_temp;

+--------------------+---------------------+------+-----+----------------+-------+
| Field              | Type                | Null | Key | Default        | Extra |
+--------------------+---------------------+------+-----+----------------+-------+
| revactor_rev       | int(10) unsigned    | NO   | PRI | NULL           |       |
| revactor_actor     | bigint(20) unsigned | NO   | PRI | NULL           |       |
| revactor_timestamp | binary(14)          | NO   |     |                |       |
| revactor_page      | int(10) unsigned    | NO   | MUL | NULL           |       |
+--------------------+---------------------+------+-----+----------------+-------+

索引

MediaWiki版本:
1.31 – 1.38

SHOW INDEX IN revision_actor_temp;

+---------------------+------------+----------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table               | Non_unique | Key_name             | Seq_in_index | Column_name        | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+---------------------+------------+----------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| revision_actor_temp |          0 | PRIMARY              |            1 | revactor_rev       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| revision_actor_temp |          0 | PRIMARY              |            2 | revactor_actor     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| revision_actor_temp |          0 | revactor_rev         |            1 | revactor_rev       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| revision_actor_temp |          1 | actor_timestamp      |            1 | revactor_actor     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| revision_actor_temp |          1 | actor_timestamp      |            2 | revactor_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| revision_actor_temp |          1 | page_actor_timestamp |            1 | revactor_page      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| revision_actor_temp |          1 | page_actor_timestamp |            2 | revactor_actor     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| revision_actor_temp |          1 | page_actor_timestamp |            3 | revactor_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+---------------------+------------+----------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+