The "xwikistatsdoc" Table

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" />
 <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" />

The columns of the xwikistatsdoc table are:

ColumnData typeClass propertynot-nullIndex
XWS_ID (primary key)bigint(20)-true-


Related Pages

Trying to decide between Cloud and On Premise? See the comparison on the XWiki Help Center.

Search this space