Jump to content

Manual:Externallinks テーブル

From mediawiki.org
This page is a translated version of the page Manual:Externallinks table and the translation is 81% complete.
Manual:コンテンツ MediaWiki のデータベース レイアウト externallinks テーブル
MediaWiki バージョン:
1.6

externallinks テーブルでは、MediaWiki が外部リンクを格納して追跡します。

プロトコル相対のリンクは、r102951 に従ってこのテーブルに2回格納されます。

フィールド

el_id

MediaWiki バージョン:
1.22

主キーです。 現状では利用されていませんが、オンラインのスキーマ変更の際に役立ちます。

el_from

ウィキ ページを参照するページ識別子です。

el_to_domain_index

MediaWiki バージョン:
1.40

This is similar to el_index but only includes the protocol specification and domain in reversed, so http://en.wikipedia.org becomes http://org.wikipedia.en..

el_to_path

MediaWiki バージョン:
1.40

Only the path of el_to. Example: /wiki/Main_Page

el_to

MediaWiki バージョン:
1.6 – 1.41
Gerrit change 954900

実際のURLそのまま。 ブラウザーに渡されます。

el_index

MediaWiki バージョン:
1.6 – 1.41
Gerrit change 954900

これは el_to と同じ URL を検索に最適化したものです: 利用者名やパスワードの情報を除去し、その他の要素は検索を高速化するために逆順にしているため、例えば http://user:password@sub.example.com/page.htmlhttp://com.example.sub./page.html になります。これにより「*.example.com へのリンクをすべて表示」の形式の検索ができるようになります。

el_index_60

MediaWiki バージョン:
1.29 – 1.41
Gerrit change 954900

部分インデックスでは並べ替え可能なクエリが実行できないため、el_index を 60 バイトに切り捨てたものです。


スキーマの要約

MediaWiki バージョン:
1.41
Gerrit change 954900

DESCRIBE externallinks;

+--------------------+------------------+------+-----+---------+----------------+
| Field              | Type             | Null | Key | Default | Extra          |
+--------------------+------------------+------+-----+---------+----------------+
| el_id              | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| el_from            | int(10) unsigned | NO   | MUL | 0       |                |
| el_to_domain_index | varbinary(255)   | NO   | MUL |         |                |
| el_to_path         | blob             | YES  |     | NULL    |                |
+--------------------+------------------+------+-----+---------+----------------+
MediaWiki バージョン:
1.40

DESCRIBE externallinks;

+--------------------+------------------+------+-----+---------+----------------+
| Field              | Type             | Null | Key | Default | Extra          |
+--------------------+------------------+------+-----+---------+----------------+
| el_id              | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| el_from            | int(10) unsigned | NO   | MUL | 0       |                |
| el_to              | blob             | NO   | MUL | NULL    |                |
| el_index           | blob             | NO   | MUL | NULL    |                |
| el_index_60        | varbinary(60)    | NO   | MUL | NULL    |                |
| el_to_domain_index | varbinary(255)   | NO   | MUL |         |                |
| el_to_path         | blob             | YES  |     | NULL    |                |
+--------------------+------------------+------+-----+---------+----------------+
MediaWiki バージョン:
1.30 – 1.39

DESCRIBE externallinks;

+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| el_id       | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| el_from     | int(10) unsigned | NO   | MUL | 0       |                |
| el_to       | blob             | NO   | MUL | NULL    |                |
| el_index    | blob             | NO   | MUL | NULL    |                |
| el_index_60 | varbinary(60)    | NO   | MUL | NULL    |                |
+-------------+------------------+------+-----+---------+----------------+
MediaWiki バージョン:
1.29

DESCRIBE externallinks;

+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| el_id       | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| el_from     | int(10) unsigned | NO   | MUL | 0       |                |
| el_to       | blob             | NO   | MUL | NULL    |                |
| el_index    | blob             | NO   | MUL | NULL    |                |
| el_index_60 | varbinary(60)    | NO   | MUL |         |                |
+-------------+------------------+------+-----+---------+----------------+
MediaWiki バージョン:
1.22 – 1.28

DESCRIBE externallinks;

+----------+------------------+------+-----+---------+----------------+
| Field    | Type             | Null | Key | Default | Extra          |
+----------+------------------+------+-----+---------+----------------+
| el_id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| el_from  | int(10) unsigned | NO   | MUL | 0       |                |
| el_to    | blob             | NO   | MUL | NULL    |                |
| el_index | blob             | NO   | MUL | NULL    |                |
+----------+------------------+------+-----+---------+----------------+
MediaWiki バージョン:
1.10 – 1.21

DESCRIBE externallinks;

+----------+------------------+------+-----+---------+-------+
| Field    | Type             | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+-------+
| el_from  | int(10) unsigned | NO   | MUL | 0       |       |
| el_to    | blob             | NO   | MUL | NULL    |       |
| el_index | blob             | NO   | MUL | NULL    |       |
+----------+------------------+------+-----+---------+-------+
MediaWiki バージョン:
1.6 – 1.9

DESCRIBE externallinks;

+----------+-----------------+------+-----+---------+-------+
| Field    | Type            | Null | Key | Default | Extra |
+----------+-----------------+------+-----+---------+-------+
| el_from  | int(8) unsigned | NO   | MUL | 0       |       |
| el_to    | blob            | NO   | MUL | NULL    |       |
| el_index | blob            | NO   | MUL | NULL    |       |
+----------+-----------------+------+-----+---------+-------+

インデックス

MediaWiki バージョン:
1.41

SHOW INDEX IN externallinks;

+---------------+------------+----------------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table         | Non_unique | Key_name                   | Seq_in_index | Column_name        | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+---------------+------------+----------------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| externallinks |          0 | PRIMARY                    |            1 | el_id              | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from                    |            1 | el_from            | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to_domain_index_to_path |            1 | el_to_domain_index | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to_domain_index_to_path |            2 | el_to_path         | A         |           0 |       60 | NULL   | YES  | BTREE      |         |               |
+---------------+------------+----------------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
MediaWiki バージョン:
1.40

SHOW INDEX IN externallinks;

+---------------+------------+----------------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table         | Non_unique | Key_name                   | Seq_in_index | Column_name        | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+---------------+------------+----------------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| externallinks |          0 | PRIMARY                    |            1 | el_id              | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from                    |            1 | el_from            | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to                      |            1 | el_to              | A         |           0 |       60 | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to                      |            2 | el_from            | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_index                   |            1 | el_index           | A         |           0 |       60 | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_index_60                |            1 | el_index_60        | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_index_60                |            2 | el_id              | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from_index_60           |            1 | el_from            | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from_index_60           |            2 | el_index_60        | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from_index_60           |            3 | el_id              | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to_domain_index_to_path |            1 | el_to_domain_index | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to_domain_index_to_path |            2 | el_to_path         | A         |           0 |       60 | NULL   | YES  | BTREE      |         |               |
+---------------+------------+----------------------------+--------------+--------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
MediaWiki バージョン:
1.30 – 1.39

SHOW INDEX IN externallinks;

+---------------+------------+------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table         | Non_unique | Key_name         | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+---------------+------------+------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| externallinks |          0 | PRIMARY          |            1 | el_id       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from          |            1 | el_from     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from          |            2 | el_to       | A         |           0 |       40 | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to            |            1 | el_to       | A         |           0 |       60 | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to            |            2 | el_from     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_index         |            1 | el_index    | A         |           0 |       60 | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_index_60      |            1 | el_index_60 | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_index_60      |            2 | el_id       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from_index_60 |            1 | el_from     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from_index_60 |            2 | el_index_60 | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from_index_60 |            3 | el_id       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+---------------+------------+------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+