Use Findset, ... vs find('-')...in C/SIDE DB

sblot
Member Posts: 21
Is anybody else who use this news function in C/SIDE DB?
In the help file I can see : This function is designed to optimize finding and updating sets. If you set any or both of the parameters to FALSE, you can still modify the records in the set but these updates will not be performed optimally.
May in C/SIDE the DB engine makes a Snapshop and it's better than find('-')?
I know this functions are design for SQL but may it's good in C/SIDE?
In the help file I can see : This function is designed to optimize finding and updating sets. If you set any or both of the parameters to FALSE, you can still modify the records in the set but these updates will not be performed optimally.
May in C/SIDE the DB engine makes a Snapshop and it's better than find('-')?
I know this functions are design for SQL but may it's good in C/SIDE?
0
Comments
-
Those commands were introduced to enhance performance on SQL Server, and to have more specific ways to access data on SQL Server, but it should work in C/SIDE as well.0
-
With the Navision-DB, I think those new commands (FINDSET,FINDFIRST,FINDLAST) is just translated in it's old-style FIND-statement, so no problem. And like Denster said, they are created for SQL.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I am also curious to know the answer to this. Returning record sets from SQL rather than processing records one at a time has some potential benefits for performance. There seems to be support in the database options (record set) on the SQL version (and not as far as I can see in the proprietary version) so is likely that this is just translated using the proprietary back end to normal record by record grabs, but I don't know if that is the case.0
-
They were introduced specifically to solve SQL Server performance issues. The old FIND commands were not specific enough as far as the intent of the command (am I going to just read, am I going to write, do I just want to see if records exist, do I really want to get the first record, do I only want the first record or am I going to loop through, etc.), so they created these command so developers can specify the intent of their query.
Because they were created specifically for SQL Server I doubt that MS did any real performance enhancement with these commands on C/SIDE, but you can never tell. Maybe they just mapped the new commands to the old ones for C/SIDE, but they could just as well have done some internal tweaking.0 -
Sadly they haven't changed old functions to the new function in existing code. I don't know if in sp2 they used them. Maybe v 5?0
-
ara3n wrote:Sadly they haven't changed old functions to the new function in existing code. I don't know if in sp2 they used them. Maybe v 5?
But not in C80,C90,C22.
So I suppose they only used the new codes in case they had to fix something.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
are this functions work ok with native database?
If I have addon or somehting like that, I don't want to make 2 different copies of it only cause of these three commands...0 -
Phenno wrote:are this functions work ok with native database?
If I have addon or somehting like that, I don't want to make 2 different copies of it only cause of these three commands...
I don't think you have to worry about this. If this wouldn't work, they would have noticed it directly => Navision is full of "FIND(...)".Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
kriki wrote:I didn't test it, but the fact they put them in means they should work fine with the native DB.
I don't think you have to worry about this. If this wouldn't work, they would have noticed it directly => Navision is full of "FIND(...)".
hm... I'll sure test it before deployment because of possible speed problems in native db. Maybe these funcs are faster on sql, but they could be slower on native...0 -
I've used them in my test database which is native without any problems, but of course I can't detect any speed differences.
I think the case with CU 80 is that they need to do a complete rewrite, which I wish they would do sooner rather than later.There is no data, only bool!0 -
The new functions has difference in how they are using the cache. If you use FIND() for iterating through some set of records, it takes 3 loops for Navision start using the cache for .NEXT. If you use FINDFIRST etc. the cache is used since first loop and Navision will use firehose for reading the record. If you use FINDSET, Navision will read whole set of records (based on the option in File-Database-Alter) - and this can be BIG performance gain.
More about these new functions is somewhere in webcast about Navision 4.00SP1. May be that the webcast is somewhere in the download section... (there were examples of the related SQL commands etc.)0 -
FIND statement is equal to SELECT *. For example this code:
Table.LOCKTABLE;
IF Table.Find('+') THEN
LastEntryNo := Table."Entry No.";
will result full table scan under SQL.
FINDLAST and FINDFIRST are equal to SELECT TOP statement which will reduce number of deadlocks.
Regards,
Marcin Woch0 -
I just tried to use findfirst and findlast in the sample 4.0 demo database I had lying around. I get the whole "You have specified an unknown variable FINDFIRST". Does the native client not allow use of these new commands? If I understand correctly, some of you have just said that it does. Any ideas?
Thanks in advance.
PS My work is getting ready to upgrade to 4.0 with sql which is the reason I'm trying to test this stuff. I don't actually want to use the Find* functions inside native.Thad Ryker
I traded my sanity for a railgun0 -
on 4.0 SP1 and higher. Those commands were not yet available on regular 4.00
-
Ahh, this explains alot thank you so very much.Thad Ryker
I traded my sanity for a railgun0 -
i tried all three new funcs in Nav 4 SP2 on native database without problems, they worked fine for me. but big drawback is, that these statements are not implemented in regular Nav 4.0Martin Bokůvka, AxiomProvis0
-
Why drawback? 4.00 without SP is unusable because too much problems. I hope that there is no customer using plain 4.00.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