Is there a utility available that will let me compare the SQL index field order compared to the Navision defined field order?
I have come into a situation where I found the contact list was extremely slow because someone decided to change the field order of several of the indexes in SQL Server (not in the NAV key property).
I would like to be able to run a comparison with all Navision defined keys versus SQL indexes and show all indexes that have a different field order.
If I had to write this, I think I would need to have a program that read all the Navision keys - maybe from text files, and then formatted queries to read the SQL table key properties.
(In case you are wondering, I can't find anyone who knows the history of decisions at this installation.)
0
Comments
Was this done directly on SQL or was it done using the SQL Index property in Navision?
Peter
RIS Plus, LLC
What we need is a Navision definition / SQL Server compare tool to show where changes have been made directly to SQL Server and thus do not show up in Navision.
Anyone know of one?
http://mibuso.com/blogs/davidmachanick/
The first link looks promising:
http://stackoverflow.com/questions/7658 ... -server-db
This one is real easy:
http://blog.sqlauthority.com/2007/12/18 ... d-columns/
Run this script in the demo database to get a full list of indexes:
sp_helpindex 'dbo.[std2009R2$Item Ledger Entry]'
Do you also need help getting key information out of NAV?
RIS Plus, LLC
I think the virtual NAV table "Key" is the best place to retrieve the NAV keys.
Do you have any other suggestions?
http://mibuso.com/blogs/davidmachanick/
RIS Plus, LLC
We still didn't get an answer to my original question. It's quite possible that this was done using SQLIndex. Sometimes becasue the property is hidden by default it is not noticed.
But as David mention, then davmac1 still haven't answered his question...
Peter
If you need different indexes in different companies, you add all of them. It's better to take the performance hit of the extra index overhead than to have a database with conflicts in the table design.
RIS Plus, LLC
"I have come into a situation where I found the contact list was extremely slow because someone decided to change the field order of several of the indexes in SQL Server (not in the NAV key property)."
It was not done using the SQLindex property.
Disabling, compiling, then re-enabling the keys fixed the problem.
Plus new companies added did not have this problem.
http://mibuso.com/blogs/davidmachanick/
Yes clear now, when you said NAV Key property, you meant SQLIndex. It makes sense now.
And even though this could be considered an advertisement, well, yes - there is a tool around to compare NAV Perception with SQL Reality when it is about "Keys" and "Indexes" 8)
(And beware: there are still other tools around which screw up your indexes from outside NAV #-o )
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
I am not sure why chenging the field order on keys used for lookups was considered a good idea unless they were tryingto optimize write transactions.
Maybe I can use this as a reason to recommend your performance tools.
I will get more info from you on your site.
BTW - I have your book
http://mibuso.com/blogs/davidmachanick/
RIS Plus, LLC