Significance of keys

jangid2k3
Member Posts: 19
What is the significance of keys in Navision.
What fields should be included in a key?
Regards
Manjeet
What fields should be included in a key?
Regards
Manjeet
0
Comments
-
If you use the native server (and don't want to change to sql), you can set the keys only for your needs. Even Boolean and optionfields are usable at every place.
The primary key has to be allways unique, so the rules are only defined by your design.
if you use (or plan) to use the SQL-Option, you should pay attention on taking the most selective fields in front of the key, otherwise the Optimizer (and the Query-enginge) of the Server will get problems or use wrong keys.
Reason: The SQL analyse the request, and tries to reduce the resultset at the early possible way.
Example: Take a look at the T21. If you use a key "Open, Customer No.,....", the first field will divide the resultset in max 1/2 of the tablesize (no matter about the usage). If you filter on Open=true, you might get a resultset of 10% (instead of the estaminated 50%). Navision Native uses Jumps on the query, so he can give you the needed 10% very very quickly. SQL tries to switch to the field Customer (or some other key!), and rebuilds the sorting for open on the resultset, so he "thinks", he will part the resultset into very little peaces (because of the Customer No.), but needs to read much more rentrys than the native does. So the better Key could be start with Customer No., Open or Outstanding Amount (is not, is calculated!) or something else.
On SQL, you will allways have to make Query-analyses on your used keys, and they can change their behavement on growing Data. So SQL will allways need Supervising over the Time. Native does not.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions