The FINDSET operation optimizes reading records from SQL Server by establishing a stream of records between Microsoft Dynamics NAV and SQL Server. While the stream is open, no other activity occurs between Microsoft Dynamics NAV and SQL Server. Before the records are read, Microsoft Dynamics NAV has no information about how many records are available to read. However, Microsoft Dynamics NAV must allocate enough memory to accommodate all records that it will read for the FINDSET operation. The stream does not allow it to read records in groups. Microsoft Dynamics NAV allocates memory for a preset number of records and then begins reading the records. You can change the value of this preset number by changing the Record Set value in the New Database or Alter Database window
Answers
So let's say you have a record variable for Item Ledger Entry, called ILE. Say you have a filter on the Item number, and there are 20 records for that item. Say your 'Record Set' parameter is set up with a value of 50. NAV will grab enough memory for 50 records, and it doesn't need all of it.
RIS Plus, LLC
ILE has 200 records total
I have a filter on item number, there are 20 records for that item
Record Set is equal to 50
Conclusion:
NAV will allocate memory for 50 records if I use FINDSET. Since 20< 50, FINDSET is the optimized choice.
:thumbsup:
Systems Analyst
NAV 2009 R2 (6.00.34463)
RIS Plus, LLC
All in a day's work...
Systems Analyst
NAV 2009 R2 (6.00.34463)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
One of the things we haven't done with this export that I'm looking into doing is temporary tables.
With another similarly-coded export, we load a separate 'Reporting ILE' table. Here's a basic overview. Note that the export needs to be in the format of Items that had sales, Customers that had sales, Sales information per item/customer combination.
Transitioning to this code (instead of reading the whole darn ILE each time) will cut the time down by probably 3/4 from what we've seen.
Our ultimate goal is to just transfer the whole thing to a SQL subscription report. Unfortunately, our SQL gurus are tied up with other projects at the moment and I'm just knowledgeable to do some basics until I can get into some winter classes.
Once we get the code transferred, I'm expecting the export will run in sub - 15 minute times =P~
Systems Analyst
NAV 2009 R2 (6.00.34463)