Manual:hitcounter テーブル

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Hitcounter table and the translation is 33% complete.
Other languages:
English • ‎español • ‎português do Brasil • ‎日本語
Manual:コンテンツ MediaWiki のデータベース レイアウト hitcounter table/ja


MediaWiki バージョン: 1.2 – 1.24

hitcounter テーブルは、MediaWiki でページ ビューの情報を格納する一時的なバッファーです。 If $wgHitcounterUpdateFreq is set to a value bigger than 1, this table stores the page_id value of every page that was visited. The value of $wgHitcounterUpdateFreq is then fed into a randomizer, which then updates the page_counter fields of the stored pages when the random number is equal to a particular value. This reduces database load; updating the page_counter field with every page hit is a main source for slow queries. After this batch update of the page_counter fields has been done, the hitcounter table is emptied.

This table was introduced in MediaWiki 1.3, and will always be empty if $wgDisableCounters is set to true. Additionally, if $wgHitcounterUpdateFreq is set to 1, the page table is directly updated, and this table is not used.

This table has been removed from the MediaWiki Core to an extension in MediaWiki 1.25 since the page counter feature itself has been removed from Core. Requests for comment/Removing hit counters from MediaWiki core を参照してください。 This functionality was then provided by the HitCounters extension. If the extension has been in use, data in this table has been moved to another place and the hitcounter table (if still present) has been removed in MediaWiki 1.26.

フィールド

hc_id

Contains the page_id of each visited page in the buffer.

スキーマの概要

MediaWiki バージョン: 1.2 – 1.24

DESCRIBE hitcounter;

+-------+------------------+------+-----+---------+-------+
| Field | Type             | Null | Key | Default | Extra |
+-------+------------------+------+-----+---------+-------+
| hc_id | int(10) unsigned | NO   |     | NULL    |       |
+-------+------------------+------+-----+---------+-------+