The xwikistatsdoc table corresponds to the com.xpn.xwiki.stats.impl.DocumentStats class and it stores information about XWiki pages and spaces view and edit statistics.
In case you haven't enabled the Statistics plugin on your wiki, the xwikistatsdoc table will be empty.
The mapping information is available in the xwiki.hbm.xml file:
<class name="com.xpn.xwiki.stats.impl.DocumentStats" table="xwikistatsdoc">
<id name="id" type="long" unsaved-value="undefined">
<column name="XWS_ID" not-null="true" />
<generator class="assigned" />
</id>
<property name="number" type="integer" column="XWS_NUMBER" not-null="false" />
<property name="name" type="string" column="XWS_NAME" not-null="true" length="255" index="XWDS_NAME" />
<!-- Before XWiki 2.2M2 this column was always containing the "internal" string to tell the storage
implementation Stats objects were special. Starting with XWiki 2.2M2 the check is now on whether the class
name is empty ("") or null. Thus this column can now contain both "internal" (old stats) and ""
(new stats) -->
<property name="className" type="string" column="XWS_CLASSNAME" length="255" />
<property name="action" type="string" column="XWS_ACTION" not-null="true" length="255" index="XWDS_ACTION" />
<property name="pageViews" type="integer" column="XWS_PAGE_VIEWS" index="XWDS_PAGE_VIEWS" not-null="false" />
<property name="uniqueVisitors" type="integer" column="XWS_UNIQUE_VISITORS" index="XWDS_UNIQUE_VISITORS" not-null="false" />
<property name="period" type="integer" column="XWS_PERIOD" index="XWDS_PERIOD" not-null="false" />
<property name="visits" type="integer" column="XWS_VISITS" index="XWDS_VISITS" not-null="false" />
</class>
The columns of the xwikistatsdoc table are:
Column | Data type | Class property | not-null | Index |
---|
XWS_ID (primary key) | bigint(20) | - | true | - |
XWS_NUMBER | int(11) | number | false | - |
XWS_NAME | varchar(255) | name | true | XWDS_NAME |
XWS_CLASSNAME | varchar(255) | className | - | - |
XWS_ACTION | varchar(255) | action | true | XWDS_ACTION |
XWS_PAGE_VIEWS | int(11) | pageViews | false | XWDS_PAGE_VIEWS |
XWS_UNIQUE_VISITORS | int(11) | uniqueVisitors | false | XWDS_UNIQUE_VISITORS |
XWS_PERIOD | int(11) | period | false | XWDS_PERIOD |
XWS_VISITS | int(11) | visits | false | XWDS_VISITS |