zopefoundation / Products.ZCatalog

Zope's indexing and search solution.
Other
5 stars 22 forks source link

keep zcatalog btrees balanced #146

Open yurj opened 1 year ago

yurj commented 1 year ago

From https://github.com/zestsoftware/plonescripts:


catalogoptimize.py

Created by Hanno Slichting and Helge Tesdal. This optimises the btree data structure of the portal_catalog. Over time this structure can become inbalanced, which causes longer load times and efficiency of the catalog. We (Zest) seen noticable startup speed increases after rebalancing catalogs of larger and longer running (4+ year) sites.

The script seems to be safe to run on an online data.fs (using subtransactions), and we havent' experienced problems with it, but please first try it on a testing environment (and test for a period afterwards).


Could the ZCatalog btrees be kept balanced over time? Or it is a complex problem?

dataflake commented 1 year ago

I have transferred the issue to the Products.ZCatalog repository because it's not a general Zope issue.

yurj commented 1 year ago

I agree even if keeping Btrees balanced can be a general issue, especially when there are containers with a lot of items.