Jump to content
MediaWiki

Manual:site_stats table

From mediawiki.org

The site_stats table contains some aggregate info on the state of the site. If the information from this table is wrong, it can be updated with the initSiteStats.php maintenance script.

Before 1.39, this table contains only one row. Since 1.39, the table may contain multiple rows (currently 10) if $wgMultiShardSiteStats is enabled and all rows should be summed up to get the statistics.

Fields

[edit ]

ss_row_id

[edit ]

Primary key, should contain 1 before 1.39 or if $wgMultiShardSiteStats is disabled.

ss_total_views

[edit ]
MediaWiki version:
≤ 1.25

Total number of page views, if hit counters were enabled. See:

ss_total_edits

[edit ]

Total number of edits performed.

ss_good_articles

[edit ]

An approximate count of pages matching the criteria explained in Manual:Article count .

See also Content::isCountable() in includes/content/Content.php

ss_total_pages

[edit ]

Total pages, theoretically equal to SELECTCOUNT(*)FROMpage; except faster

ss_users

[edit ]

Number of users, theoretically equal to SELECTCOUNT(*)FROMuser;

ss_active_users

[edit ]
MediaWiki version:
≥ 1.14

Number of users who have edited in the last $wgActiveUserDays days (see also $wgActiveUserEditCount )

ss_admins

[edit ]
MediaWiki version:
≤ 1.20

Deprecated, no longer updated as of 1.5

ss_images

[edit ]

Number of images, equivalent to SELECTCOUNT(*)FROMimage;

Schema summary

[edit ]
MediaWiki version:
≥ 1.31

DESCRIBEsite_stats;

+------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------------+------+-----+---------+-------+
| ss_row_id | int(10) unsigned | NO | PRI | NULL | |
| ss_total_edits | bigint(20) unsigned | YES | | NULL | |
| ss_good_articles | bigint(20) unsigned | YES | | NULL | |
| ss_total_pages | bigint(20) unsigned | YES | | NULL | |
| ss_users | bigint(20) unsigned | YES | | NULL | |
| ss_active_users | bigint(20) unsigned | YES | | NULL | |
| ss_images | bigint(20) unsigned | YES | | NULL | |
+------------------+---------------------+------+-----+---------+-------+
MediaWiki versions:
1.21 – 1.30

DESCRIBEsite_stats;

+------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------------+------+-----+---------+-------+
| ss_row_id | int(10) unsigned | NO | PRI | NULL | |
| ss_total_edits | bigint(20) unsigned | YES | | 0 | |
| ss_good_articles | bigint(20) unsigned | YES | | 0 | |
| ss_total_pages | bigint(20) | YES | | -1 | |
| ss_users | bigint(20) | YES | | -1 | |
| ss_active_users | bigint(20) | YES | | -1 | |
| ss_images | int(11) | YES | | 0 | |
+------------------+---------------------+------+-----+---------+-------+
MediaWiki versions:
1.14 – 1.20

DESCRIBEsite_stats;

+------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------------+------+-----+---------+-------+
| ss_row_id | int(10) unsigned | NO | PRI | NULL | |
| ss_total_views | bigint(20) unsigned | YES | | 0 | |
| ss_total_edits | bigint(20) unsigned | YES | | 0 | |
| ss_good_articles | bigint(20) unsigned | YES | | 0 | |
| ss_total_pages | bigint(20) | YES | | -1 | |
| ss_users | bigint(20) | YES | | -1 | |
| ss_active_users | bigint(20) | YES | | -1 | |
| ss_admins | int(11) | YES | | -1 | |
| ss_images | int(11) | YES | | 0 | |
+------------------+---------------------+------+-----+---------+-------+
MediaWiki versions:
1.10 – 1.13

DESCRIBEsite_stats;

+------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------------+------+-----+---------+-------+
| ss_row_id | int(10) unsigned | NO | PRI | NULL | |
| ss_total_views | bigint(20) unsigned | YES | | 0 | |
| ss_total_edits | bigint(20) unsigned | YES | | 0 | |
| ss_good_articles | bigint(20) unsigned | YES | | 0 | |
| ss_total_pages | bigint(20) | YES | | -1 | |
| ss_users | bigint(20) | YES | | -1 | |
| ss_admins | int(11) | YES | | -1 | |
| ss_images | int(11) | YES | | 0 | |
+------------------+---------------------+------+-----+---------+-------+
MediaWiki versions:
1.6 – 1.9

DESCRIBEsite_stats;

+------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------------+------+-----+---------+-------+
| ss_row_id | int(8) unsigned | NO | PRI | NULL | |
| ss_total_views | bigint(20) unsigned | YES | | 0 | |
| ss_total_edits | bigint(20) unsigned | YES | | 0 | |
| ss_good_articles | bigint(20) unsigned | YES | | 0 | |
| ss_total_pages | bigint(20) | YES | | -1 | |
| ss_users | bigint(20) | YES | | -1 | |
| ss_admins | int(10) | YES | | -1 | |
| ss_images | int(10) | YES | | 0 | |
+------------------+---------------------+------+-----+---------+-------+
MediaWiki version:
1.5

DESCRIBEsite_stats;

+------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------------+------+-----+---------+-------+
| ss_row_id | int(8) unsigned | NO | PRI | NULL | |
| ss_total_views | bigint(20) unsigned | YES | | 0 | |
| ss_total_edits | bigint(20) unsigned | YES | | 0 | |
| ss_good_articles | bigint(20) unsigned | YES | | 0 | |
| ss_total_pages | bigint(20) | YES | | -1 | |
| ss_users | bigint(20) | YES | | -1 | |
| ss_admins | int(10) | YES | | -1 | |
+------------------+---------------------+------+-----+---------+-------+
MediaWiki version:
1.4

DESCRIBEsite_stats;

+------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------------+------+-----+---------+-------+
| ss_row_id | int(8) unsigned | NO | PRI | 1 | |
| ss_total_views | bigint(20) unsigned | YES | | 0 | |
| ss_total_edits | bigint(20) unsigned | YES | | 0 | |
| ss_good_articles | bigint(20) unsigned | YES | | 0 | |
| ss_total_pages | bigint(20) | YES | | -1 | |
| ss_users | bigint(20) | YES | | -1 | |
| ss_admins | int(10) | YES | | -1 | |
+------------------+---------------------+------+-----+---------+-------+
MediaWiki versions:
1.1 – 1.3

DESCRIBEsite_stats;

+------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------------+------+-----+---------+-------+
| ss_row_id | int(8) unsigned | NO | PRI | NULL | |
| ss_total_views | bigint(20) unsigned | YES | | 0 | |
| ss_total_edits | bigint(20) unsigned | YES | | 0 | |
| ss_good_articles | bigint(20) unsigned | YES | | 0 | |
+------------------+---------------------+------+-----+---------+-------+

Indexes

[edit ]
MediaWiki version:
≥ 1.30

SHOWINDEXINsite_stats;

+------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| site_stats | 0 | PRIMARY | 1 | ss_row_id | A | 0 | NULL | NULL | | BTREE | | |
+------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
Engines
Current
Former
Technical documentation
Configuration
Development
Core tables
Current
Former

AltStyle によって変換されたページ (->オリジナル) /