Dear all at BaseX,
In a indexed database,
Query info shows that a request like Count(/a/b/c) does not use the statistics data available with index:facets().
Could you please tell me if this is really the case, and if there is a way to tell BaseX to use it ?
Best regards,
And thank you for your great XNDB !
Fabrice
Here is the query :
Query: declare namespace exch = 'http://www.epo.org/exchange';
count(/exch:exchange-documents/exch:exchange-document)
Query plan:
<QueryPlan>
<FNAggr name="count(item)">
<IterPath>
<DBNodeSeq size="38">
<DBNode name="DOCDB_RU" pre="0"/>
<DBNode name="DOCDB_RU" pre="4198620"/>
<DBNode name="DOCDB_RU" pre="7369614"/>
<DBNode name="DOCDB_RU" pre="11083006"/>
<DBNode name="DOCDB_RU" pre="15423603"/>
</DBNodeSeq>
<IterStep axis="child" test="exch:exchange-documents"/>
<IterStep axis="child" test="exch:exchange-document"/>
</IterPath>
</FNAggr>
</QueryPlan>
Here is the db:info() :
<database>
<databaseproperties>
<name>DOCDB_RU</name>
<size>3391 MB</size>
<nodes>135589551</nodes>
<documents>38</documents>
<binaries>0</binaries>
<timestamp>2013-01-29-23-16-31</timestamp>
</databaseproperties>
<resourceproperties>
<inputpath>C:/data/work/docdb/RU</inputpath>
<timestamp>2012-12-28-06-53-45</timestamp>
<encoding>UTF-8</encoding>
<whitespacechopping>ON</whitespacechopping>
</resourceproperties>
<indexes>
<uptodate>true</uptodate>
<textindex>ON</textindex>
<attributeindex>ON</attributeindex>
<fulltextindex>OFF</fulltextindex>
<updindex>ON</updindex>
<maxcats>10000</maxcats>
<maxlen>96</maxlen>
</indexes>
</database>