Skip to main content
Skip table of contents

HCMS CDB Optimization

[]

Target

shrink database size; optimize db speed;

Solution

By default database (CDB) builds up an index for each feature. Usually these corresponding <index-config> are only added to datastore configuration to provide optimization hints or disable single features.

It is possible to set automatic feature index creation to off. Each feature available to satellite and having an index must be explizit mentioned in datastore configuration. Indices can be added and datastore can be rebuild 'on the fly' (by editing datastore configuration and trigger server command)

The Flipside

As every needed feature has to be included by hand the flipside is effort.

  • Effort to analyse features needed / in use.
  • Effort to add each of them to configuration.
  • Effort to maintain, update, build db always manual on configuration change.

Set up

Warning: Caution: The datastore service and therefore the satellites may go out of service by executing these changes!

First of all datastore configuration must be set to new behaviour by adding attributes:

XML
<datastore>
   <features index-disabled-by-default="true" skip-rebuild-on-feature-config-change="true">

  <!-- index-disabled-by-default: 
  if true all indices need to be added and configured manually; 
  if false all features have a index with default configuration -->

  <!-- skip-rebuild-on-feature-config-change: 
  if true either complete CDB needs to be rebuild manually 
  or specific indices need to be rebuild by server command -->

Steps

  • duplicate datastore config to new sat group (see guide)
  • ensure only one Datastore config in satellite configuration group (be aware of templating instance)
  • edit datastore config
    • caution: changing active datastore config restarts Datastore
  • switch satellite to new group
  • right click satellite asset -> Server actions ...

Examples for index configs in DataStore config:

XML
<feature key="censhare:module.oc.permissions.granted">
  <index-config/>
</feature>

<feature key="censhare:module.oc.permission.group">
  <index-config isnull-column="true" notnull-column="true"/>
</feature>

<feature key="censhare:module.oc.permission.group-ref">
  <index-config isnull-column="true" notnull-column="true"/>
</feature>

<feature key="censhare:name">
  <index-config/>
</feature>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.