Pages

Monday 15 September 2014

What is index in ax 2009 and 2012

There are two types of indexes:
Unique and Non-Unique.
Whether an index is unique is defined by the index's Allow Duplicates property.
When this property is set to No, a unique index is created.
The database uses the unique index to ensure that no duplicate key values occur.
The database prevents you from inserting records with duplicate key values by rejecting the insert
Setting the index's Allow Duplicates property to Yes creates a non-unique index.
These indexes allow you to enter duplicate values for the indexed fields and are used for performance reasons.


Microsoft Dynamics AX requires a unique index on each table
so if there are no indexes on a table or all the indexes are disabled,
a system index is automatically created. The system index is created
on the RecId and DataAreaId fields if the DataAreaId field exists.
Otherwise the system index is created on the RecId field.
You can see system indexes in the database but they aren't visible in the AOT.
If there are indexes on a table but none of them are unique,
 the runtime estimates the average key length of the existing indexes,
chooses the index with the smallest key length and appends the RecId column to create a unique index.

 

No comments:

Post a Comment