Hello I was looking at the beta 5.0 and Navision has changed the sql keys.
For example in Item Ledger. They have changed the Navision key
Source Type,Source No.,Item No.,Variant Code,Posting Date
To sql index
Source No.,Item No.,Variant Code,Posting Date,Entry No.
Since Navision calls sort by
Source Type,Source No.,Item No.,Variant Code,Posting Date
in sql statement when you use the key, does this cause SQL to do more processing to sort it by that order?
My question is basically does SQL use indexes for sorting?
And how much processing is involved in sorting.
Thank you.
Answers
Please make sure your users understand that on SQL reports can be significantly slower than on C/Side and that having a Reporting database can become a fine solution.
I remember when one of the great selling points of Navision, was "And you don't need to have a separate reporting database with buckets".
Now I don't why is it important that the first field of the key should have high "selectivity" instead of the key itself, but it seems to be...
You would have to look through 90 percent of the book. In computer terms it means means you have to put that into cache and then look through it 90 of the record.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
So if all the fields in the first field are the same, then you are scanning through a lot of leafs and looking at each one.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
The real issue now with 2005 is having dynamic fields in the clustered index. Once a record is inserted into a table with a clustered index the fields in the clustered index should not be updated. This causes serious overhead because if the data in the clustered index changes all non-clustered indexes must be updated to reflect the change. If you look at some of the manf. table clustered index you will find "Status" as the first field, this is not good as the status will change over time and each time it changes the entire clustered index must be updated and all non-clustered indexes.
"getting on my soap box"
I am not sure where the whole "limit the amount of non-clustered indexes" on a table for better performance came from but it is my opinion that this is not accurate. The loss of performance form missing one necessary non-clustered index can have serious performance impact FAR greater than the few milliseconds it take to update and maintain non-clustered indexes. The extra over head from 10 extraneous non-clustered indexes tiny compared to the overhead and performance hit you will take from missing one necessary non-clustered index.
This should be slowly becoming a non-issue as SQL 2005 has a DMV that tracks index usage stats and can tell you exactly what indexes are being used and how often.
"Done Preaching"
The Status field in manufacturing is a real nightmare for performance tuning, been there, done that. :?
In the navision world we definately have a lot to learn on how to make our solution work for SQL
The story about selectivity is strange, because when I was at teched in barcelona last year there was a session specialy about selective indexing on SQL 2005.
RIS Plus, LLC
Although Boston (not Barcelona) had a high quality NAV team I learned the most from the other sessions.
I did however got a change to learn other MS experts about NAV which was pretty cool.
Yeah I have to agree, Tech Ed (IT Forums) was very useful, I would recommend it to those Navision experts that want to know what else is going on out there.
And Mark, this is the topic you and I discussed after one of the SQL sessions.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
You can't make your mind huh?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
RIS Plus, LLC
RIS Plus, LLC
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!