Redigera

SIFT and performance

Design SIFT indexes to speed up aggregate queries without adding unnecessary update costs. Consider the query workload and the cost of maintaining each index.

Choose useful SIFT keys and fields

Consider these factors when you design or tune a SIFT index:

  • Each maintained SIFT index adds work when the base table changes. Keep indexes that benefit your aggregate queries.
  • Additional key fields, including date fields, can increase the number of groups and the size and maintenance cost of an index. Date fields don't automatically create three times as many entries as other fields.
  • Choose the key-field order to match your aggregate-query filters. The runtime favors indexes whose leading fields are filtered. Consider the actual distribution of values rather than assuming that an Integer field is more selective than an Option field.

Balance calculation benefits against maintenance costs

Consider both the costs and the benefits of maintaining SIFT indexes.

Cost Benefit
Updates to the SIFT indexes Fast calculation of sums
Potential locking conflicts

The following diagram illustrates the trade-off. The benefit depends on the number of records included in aggregate queries and the number of updates to the base table.

Charts compare SIFT calculation benefits with the number of records summed and the number of table updates.

Set the key's MaintainSIFTIndex property to false to disable maintenance of that SIFT index. Calculations remain available, but they can't use that maintained SIFT index.

Choose whether to maintain each index based on the table size, aggregate-query frequency, filters, and update workload. A large table can benefit from SIFT even if it rarely grows. Maintaining every SIFT index on a growing table can add unnecessary update and locking costs. Learn more in MaintainSIFTIndex property.

In Business Central, each maintained SIFT index also maintains a count. This supports Count and Average FlowField calculations when a suitable SIFT index is available. Learn more in Record.CalcFields method.

Learn more about database access performance in Data access.

Important

Test every change to SIFT structures. Verify that calculations remain correct and that the change doesn't cause performance regressions elsewhere in the application.

SumIndexField technology (SIFT)
SIFT and SQL Server
SIFT tuning and tracing
Migrating from SIFT to NCCI
FlowFields