DataItemTableView, DataItemLink, OnPreDataItem - priority?

randrews
Member Posts: 135
Hi.
Anybody know priority of filters in
DataItemTableView, DataItemLink, OnPreDataItem?
Would be key "First Field","Second field","Third Field" the best in this example :
Property DataItemTableView in report item have filter on "First Field"
Property DataItemLink in report item have link on "Second field"=FIELD("Field from another table")
Triger OnPreDataItem have code
SETRANGE("Third Field",'some value');
?
Anybody know priority of filters in
DataItemTableView, DataItemLink, OnPreDataItem?
Would be key "First Field","Second field","Third Field" the best in this example :
Property DataItemTableView in report item have filter on "First Field"
Property DataItemLink in report item have link on "Second field"=FIELD("Field from another table")
Triger OnPreDataItem have code
SETRANGE("Third Field",'some value');
?
0
Comments
-
Just came across this old post and does anyone have any input? I'm trying to optimise performance by applying filters as early as possible and it would be good to know0
-
The answers an considerations are different for today's versions than back when that original question was posted. When upgrading a report, blindly following the original design can sometimes be the worse thing to do. Unfortunately, that is often what happens during an upgrade. Even Microsoft does it. They do seem to eventually get around to redesigning some reports
With older version, data was retrieved in pieces with each DataItem. Indented dataItems were retrieved for the related records only. Newer versions construct a compound SQL query to pull all the data at once.
Talking only about modern NAV\BC, the answer is it does not really matter. As they are all executed before the call to SQL is made. But the specifics can change the structure of the resulting SQL query and thus its performance.
There are no bugs - only undocumented features.2
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