slow flowfield
Reinhard
Member Posts: 249
Hi guys, I have been searching the forum but could not find a good solution to my problem:
I have a flowfield that is Sum: Quantity for Job Ledger Entry, with the filters:
Employee No.,Posting Date,Job No.,Phase Code,Payroll Control Code
All is fine. Now I add another filter: Type CONST Resource.
This field has been added to the key as well. However the flowfield now takes several minutes to calculate.
Please if you know something help me out I am at a total loss right now.
I have a flowfield that is Sum: Quantity for Job Ledger Entry, with the filters:
Employee No.,Posting Date,Job No.,Phase Code,Payroll Control Code
All is fine. Now I add another filter: Type CONST Resource.
This field has been added to the key as well. However the flowfield now takes several minutes to calculate.
Please if you know something help me out I am at a total loss right now.
0
Answers
-
-
if SQL which NAV version? And how looks your customized key?
RegardsDo you make it right, it works too!0 -
I don't know if this is the case, I've actually always wondered but never investigated.
The Type field is at the end of your key, but in your FlowField it is always Resource. Maybe it filters on that first? So it's not really sorted on that field, but it is trying to apply the filters it knows it can apply before you add any.
So in short, try moving type to the start of the key and see if it is faster.0 -
Matttrax: I investigated what you suggested, but unfortunately it didn't speed it up.
Also, to clarify, if I remove the Type constraint from the flowfield, it is almost instantaneous. If I drill down on the flowfield to the ledger entries and select the correct key, and then filter on Type it is also really fast.0 -
Perhaps running client monitor could tell you why it's taking so long.
Write a little script to calculate if for one record. Compare the records that client monitor is going through to the records you think it should have to search to calculate the correct value.0 -
To test your problem do the following. Create a blank form that shows Only your flowfield. If it is fast then maybe the field you added affects another flowfield's calculation (I think this happens because Nav uses the first key in order that satisfies the constraints.). You'll need to use the client monitor in order to see which key is used and how much time it takes.0
-
First and for all: on which fields are you filtering?
Second : what is the type of the filter? (1 value, a range of values, ...)
I would restore the original key.
I would create a new one with the fields of the filters (the most selective I would place first).
I would NOT maintain the SQLIndex, and maintain ONLY the lowest level of the SIFTIndex.
[Topic moved from 'NAV/Navision' forum to 'SQL Performance' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
By creating a form with a button that just did CALCFIELDS and running the client monitor I saw that it was filtering on Type first. I recreated the key like this:
Employee No.,Posting Date,Job No.,Phase Code,Payroll Control Code,Type
And this reduced the time from 74 seconds to about .4
Thank you for the useful suggestions.0 -
reinhard:Database:
Native Nav 4.3kriki wrote:First and for all: on which fields are you filtering?
Second : what is the type of the filter? (1 value, a range of values, ...)
I would restore the original key.
I would create a new one with the fields of the filters (the most selective I would place first).
I would NOT maintain the SQLIndex, and maintain ONLY the lowest level of the SIFTIndex.
[Topic moved from 'NAV/Navision' forum to 'SQL Performance' forum]
Hi, first of all, i think kriki didn't noticed that the database is Native
...anyway, i saw that Reinhard put the most selective field at the beginning...shouldn't be the less selective instead for a native DB?or am i wrong? 0 -
Belias wrote:...anyway, i saw that Reinhard put the most selective field at the beginning...shouldn't be the less selective instead for a native DB?or am i wrong?
With Native database, the order of the fields in the key on a flow field only matter (from a performance point of view) if a range is involved. This is why we often see "posting date" as the last element of a key, since posting date generally filters on a range of dates.
So basically if you have Type and No. int he key, and you can use SETRANGE on both, then it does not matter the order of the keys.
But Alain should move this to the correct forum, because this does not apply to SQL.David Singleton0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 333 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


