Speed: temp Rec vs. Rec

abartonicek
Member Posts: 162
Is there any performance gain in using temporary records instead normal records when I want to do some data investigation by using nested loops?
I tried both on G/L Entry but I was surprised to see that by using temp records the speed was 2x slower! (not counting the filling of the temp rec) :?:
First I have to fill the temp record (repeat..until next 0)
then I can use it, right?
The rest of the code was the same as in normal record case!
I thought that temp rec should be quicker!
Did I overlook something or am I doing something totally wrong?
I tried both on G/L Entry but I was surprised to see that by using temp records the speed was 2x slower! (not counting the filling of the temp rec) :?:
First I have to fill the temp record (repeat..until next 0)
then I can use it, right?
The rest of the code was the same as in normal record case!
I thought that temp rec should be quicker!
Did I overlook something or am I doing something totally wrong?
Better to be critical then self-critical 

0
Answers
-
The temptable data is built op on your local system instead of on the server. Maybe you can try using a faster client.0
-
Paging of virtual memory on your workstation can impact temptable performace. In particular working with large temp tables.There are no bugs - only undocumented features.0
-
So, in short, when I'm testing/doing something using my local client I can't get any speed boost using temp tables!
I hoped that temp tables would be faster because the whole table would be in system memory but I was too optimistic or I just need more RAMBetter to be critical then self-critical0 -
No, it's always slower. You can speed it up a bit by setting the local cache to 1000000
-
My Windows pagefile (virtual memory) is 1024MB and Navision Object Cache (KB) = 50000, DBMS Cache (KB) = 150000, Commit Cache = Yes.
Can I do anything else?Better to be critical then self-critical0 -
Maybe we'd better start with the question we should have started with in the first place:
What is the reason you are investigating this? Do you have performance issues? Or are you just interested in the subject?0 -
Just interested, I guess
We had some problems before so we are checking some data from time to time. For this we have to use nested loops so speed boosts are always welcome
BTW, we have some strange problem, or something that is going to become a problem.
When we go on:
General Ledger -> Registers ->Menu Button "Register" -> General Ledger
we get form (dialog window...) that looks like this:
Searching the G/L Entry table, press Ctrl+Break to cancel... 49824
Counter. . . . . . . . . 49824
Table . . . . . . . . . . G/L Entry
Key. . . . . . . . . . . Document No. G/L Account No. Docum...
Why is that so? This started few week ago, and as the No. of entries in that table increases it takes longer and longer to get rid of that form.
Some times it pops up when we want to search the G/L Entry or any other (little bigger) table.
Our G/L Entry table currently has 200.000 entries!Better to be critical then self-critical0 -
Is codeunit 235 - G/L Reg.-Gen. Ledger changed on your system?
or has someone changed the default sorting of form 20?0 -
This message is usually a result of a bad key selection. Has the form been modified? Or the table?
200,000 GL Entry records is fairly small. We have one customer with over 8,000,000 GL Entry records and probably even larger ones.There are no bugs - only undocumented features.0 -
Yes, Form 20 is changed - sorting is by Document No, G/L Account No - requested by our client
I know 200.000 is small, that is way I'm worried.Better to be critical then self-critical0 -
Maybe you can try changing the key by code in codeunit 235; That may overrule the key set in the form.
OItherwise you can make a copy of form 20, reset the key and run this from codeunit 235 instead of the default form (20)0 -
I have to use that different key so I don't think I want to overrule that key in codeunit 235.
BTW, the form I'm running IS a copy of form 20 with that different key and some other, minor, changes.
So, because of that non primary key, the performance of that form is suffering.Better to be critical then self-critical0
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