I am trying to create a key with slight change in the order of fields of an already existing key.
Since similar key was already in the key tables, I just assumed it won’t cost much,
but now I think about it, even though all the fields were already being used, adding another key would means more processing cost.
Right?
Also, since I am planning on using this new key instead of the already existing key, would it be safe to remove the previous one?
I know the most frequent user won’t be needing the previous key for sorting.
Is there a way to check whether a certain key is being used in DataItemTableView? Any other places to check before removing a key?
The reason why I am trying to add a new key is to sort the data items in a report to so that I can do some calculation easily and this was the only way I could think of. I guess it’s better to find a way to do things without adding keys to tables.
Your DB admin may have given you db_datareader role, but it’s not enough for changing DB structure. To perform such changes as adding index you need db_owner, which is the highest DB role, normally not needed for Navision users, and DBadmins usually don’t give it away so easily. You may ask him to assign this role for you temporarily, or ask him to create the key for you, if he has access to Navision with his login credentials.
Unfortunately there is no other way to sort data in Navision report as using some of existing indexes…