Hi Experts,
Rather silly question, I think, but I want to be sure.
Do I understand it correctly, that:
1) in NAV2013 we can use any sorting we want on forms or in code, it is not now depending on which keys exist in the table.
2) However, the speed of sorting will be much slower than if the NAV key exists, so you cannot just use any sorting you want, in for example, posting routine, because of performance issues.
Is my understanding correct, or I missed something?
0
Comments
Thank you Mark.
Actual thing is I need to apply a specific sorting in the posting, but I do not have a proper key. I need to sort the entries to apply by custom field, lets say "MyCode" along with other standard fields.
Will it be a performance disaster if I change the SETCURRENTKEY statement from existing key
to
the latter key does not exist
I have a slight hope that since the 'similar key' #-o :oops: exists, it somehow may help the situation.
Thanks in advance!
Large implementations should always allow some days for index tuning and partners should be aware of that by now.
If you put a filter on new field AND you have a key that starts with that field AND your values or highly selective THEN it is possible that SQL decides to use that key instead of a key that starts with "Item No.".
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
If we now can use:
Table_xxx.SETCURRENTKEY('Field1','Field2','Field3');
Where the key 'Field1','Field2','Field3' doen't exist on Table_xxx, there will be no need to create it? Will it even decresase performance creating it on the table? The SQL server seems to be handling all the key-issues now...
RIS Plus, LLC
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
However, I got a suggestion to add 3 separate indexes for those 3 fields.
Handling short indexes gives faster results than long indexes according to my colleague.
What do you think?
Evert-Jan
There is no use in adding all three indexes if you are always filtering on all three fields all the time.
Just one index on the widest range might be the right thing to do - or come to NAVTechDays and listen to Jörg Styrk. http://dynamicsuser.net/blogs/stryk/default.aspx
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com
Colleagues will be there...
Evert-Jan