MaintainSIFTIndex

lyotlyot Member Posts: 202
Hi,

When I was studying for my exam "Installation and configuration in Microsoft Dynamics NAV", I came
across this piece of disturbing lecture:


MaintainSIFTIndex
This key property determines whether SIFT structures are created (when the
property is set to Yes) or dropped (when the property is set to No) in SQL Server
to support the corresponding SumIndexField for the Microsoft Dynamics NAV
key.
SumIndexFields are created in Microsoft Dynamics NAV to support, for
example, FlowField calculations and other fast summing operations. SQL Server
can sum numeric data by scanning the table. If the SIFT structures exist for the
SumIndexFields, summing the fields is faster, especially for large sets of records.
On the other hand, modifications to the table are slower because the SIFT
structures must also be maintained.
There are situations where SumIndexFields must be created on a key to allow
FlowField calculations, but the calculations are performed infrequently or on
small sets of data. In these situations, you can disable this property to prevent
modifications to the table from being too slow.



When I read this, I deceided to look at some default keys (who use sift) on std. nav tabels.
For example Warehouse Entry.
The key "Item No.,Bin Code,Location Code,Variant Code,Unit of Measure Code,Lot No.,Serial No.,Entry Type" has this property set on no.

Now consider if I make a flowfield (on some table) that sums "Qty. (Base)" on Warehouse Entry according to Location Code, Bin Code, Item Code and Variant Code.
There's no way to set which key to use when defining a flowfield, so this is handled by SQL I presume?
What if SQL deceides to use the above key?
I guess that's a disaster for my performance? :(

Comments

  • bbrownbbrown Member Posts: 3,268
    NAV will use the first key that is able to satisfy the filters defined on the flowfield, and supports the desired output field as a SumIndex.
    There are no bugs - only undocumented features.
  • lyotlyot Member Posts: 202
    bbrown wrote:
    NAV will use the first key that is able to satisfy the filters defined on the flowfield, and supports the desired output field as a SumIndex.

    Disregarding the "MaintainSIFTIndex" property I presume...
  • bbrownbbrown Member Posts: 3,268
    lyot wrote:
    bbrown wrote:
    NAV will use the first key that is able to satisfy the filters defined on the flowfield, and supports the desired output field as a SumIndex.

    Disregarding the "MaintainSIFTIndex" property I presume...

    Above I've defined how NAV chooses which key to use. This may or may not be the same as the index used by SQL. Other factors can impact that. The property "MaintainSIFTIndex" determines whether SQL maintains the related indexed view or calculates the result on the fly. It has no impact on the key that NAV uses. But would impact the index used by SQL since the data would be coming from the base table (if ""MaintainSIFTIndex" is off) and not the indexed view.
    There are no bugs - only undocumented features.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    It also depends on the version of Navision and SQL that you are using.
    David Singleton
Sign In or Register to comment.