Nota
O acesso a esta página requer autorização. Pode tentar iniciar sessão ou alterar os diretórios.
O acesso a esta página requer autorização. Pode tentar alterar os diretórios.
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
Integerfield is more selective than anOptionfield.
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.
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.
Related information
SumIndexField technology (SIFT)
SIFT and SQL Server
SIFT tuning and tracing
Migrating from SIFT to NCCI
FlowFields