Here are steps to recreate the problem:

(1) Add one or more entries to an new (empty) database. One the BaseX Database Administration's Database page, you'll find that the database's COUNT column shows the number of entries added and that the database's BYTES column shows the database size.

(2) Update one or of the database's entries. After refreshing BaseX Database Administration's Database page, you should find that the database's COUNT and BYTES columns both increased.

(3) On the BaseX Database Administration's Database page, select the database and press the Optimize button. You should find that the database's COUNT column decreases back to the number of entries in the database. However, the database's BYTES column doesn't decrease to reflect a reduction in the database size.


Maybe I have a misundertanding in what the Optimize button on the BaseX Database Administration's Database page actually does.

Geoff Alexander, Ph.D.
Software Engineer, Corporate Tools Development
IBM Corporation
Charlotte, NC


Inactive hide details for "Christian Grün" ---07/16/2020 02:11:23 PM---It's surprising that the count value changed, as it shou"Christian Grün" ---07/16/2020 02:11:23 PM---It's surprising that the count value changed, as it should represent the number of resources (docume

From: "Christian Grün" <christian.gruen@gmail.com>
To: Geoff Alexander <gdlxn@us.ibm.com>
Cc: BaseX <basex-talk@mailman.uni-konstanz.de>
Date: 07/16/2020 02:11 PM
Subject: [EXTERNAL] Re: Possible bug in database size (bytes) after database optimize from BaseX Database Administration





It's surprising that the count value changed, as it should represent the number of resources (documents, binary files) in your database – and this value shouldn't change if your data is optimized. Feel free to provide us with a little reproducible example.

The size of the database may stay the same, though. The DBA provides no way to trigger a full optimization, but you can e.g. use the query panel for that.





Geoff Alexander <gdlxn@us.ibm.com> schrieb am Do., 16. Juli 2020, 20:04: