Nav Sp1 5.0 Bulk Insert

NavStudent
Member Posts: 399
Hello Navision has introduced with 5.0 SP1 Bulk insert.
By my definition Bulk insert is actualling using BULK INSERT statement.
What I see in query profiler is
insert record one
insert record two.
etc etc.
Is this actually bulk insert? or just that the records not insert until the commit and then inserted?
Also if they are calling insert, wouldn't it be faster to use union all statement instead.
read this post and performance difference
http://blog.sqlauthority.com/2007/06/08 ... union-all/
Thank you.
By my definition Bulk insert is actualling using BULK INSERT statement.
What I see in query profiler is
insert record one
insert record two.
etc etc.
Is this actually bulk insert? or just that the records not insert until the commit and then inserted?
Also if they are calling insert, wouldn't it be faster to use union all statement instead.
read this post and performance difference
http://blog.sqlauthority.com/2007/06/08 ... union-all/
Thank you.
my 2 cents
0
Comments
-
As far as bulk insert statement concerned, it accepts a file or xml file.
As far as the way the inserts are called, I don't know maybe MS can answer this?0 -
The bulk insert doesn't use union all.
It just buffers the inserts until a COMMIT is called or until you do some other action (SELECT,MODIFY,DELETE,...) on that table.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
kriki wrote:The bulk insert doesn't use union all.
It just buffers the inserts until a COMMIT is called or until you do some other action (SELECT,MODIFY,DELETE,...) on that table.
Thanks for confirming that it's not really bulk insert.
So since it's not a bulk insert and just buffering till the end, why aren't they calling insert once and doing a union on all the parameters. This will ave a lot better performance.my 2 cents0 -
The first performance gain is a single insert statement which is reduction in network traffic. I'm just curios why Navision didn't implement the insert that way. You would have gained much better performance on insert.my 2 cents0
-
Because it will need much more work than just "buffering" the inserts and make them in one "bulk"... do not forget that there is no time to do "big" optimalization on current architecture. One day, the architecture will change and NAV (or what will be the name in these days) will use another method to insert the data...
You know, this change was optimal from "gain/cost" ratio...0 -
I don't buy the big change.
I would say buffering insert is a bigger change, Replacing SIFT is a bigger change.
CallingINSERT INTO Item ([No], Description) VALUES ('ABC','afg'); INSERT INTO Item ([No], Description) VALUES ('BCD','ghk');
instead ofINSERT INTO Item ([No], Description) SELECT 'ABC','afg'; UNION ALL SELECT 'BCD','ghk';
is minor, and the performance difference huge. 100 or 1000 records. :whistle:my 2 cents0 -
Yes, just comparing the SQL queries, it look like easy task. But you need to take into account all the levels between C/Al command and the resulting SQL query. The communication library is working in some way (each command is translated into SQL query) and you can find out that in time when you are producing the SQL query, you have no info about upcomming next insert and you have no context and data to union these inserts. It is why this easilly looking change is a big problem...0
-
Maybe you should get a job at Microsoft, so you can tell them how to do it0
-
kine wrote:Yes, just comparing the SQL queries, it look like easy task. But you need to take into account all the levels between C/Al command and the resulting SQL query. The communication library is working in some way (each command is translated into SQL query) and you can find out that in time when you are producing the SQL query, you have no info about upcomming next insert and you have no context and data to union these inserts. It is why this easilly looking change is a big problem...
You'll be doing UNION on all the fields. UNIONALL.
All we are doing is stipulating. If MS could give an answer it would be helpful.my 2 cents0 -
DenSter wrote:Maybe you should get a job at Microsoft, so you can tell them how to do it
All, I'm doing is asking a question.
I was asking a while back about indexed views that could be implemented instead of SIFT, and behold SP1 made the change.my 2 cents0 -
NavStudent wrote:All, I'm doing is asking a question.0
-
DenSter wrote:NavStudent wrote:All, I'm doing is asking a question.
I wouldn't recommended it. It's probably better to make a ruckus at the forums instead of working in the development team.
You may be bogged down by politics instead of doing what you're doing now.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
0
-
[Topic moved from Navision forum to SQL Performance forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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