Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhacement: Optimize the 'InsertAll' way of insertion. #380

Open
mikependon opened this issue Jan 25, 2020 · 0 comments
Open

Enhacement: Optimize the 'InsertAll' way of insertion. #380

mikependon opened this issue Jan 25, 2020 · 0 comments
Assignees
Labels
optimization An optimization task performance A performance related task/feature todo Things to be done in the future

Comments

@mikependon
Copy link
Owner

Description

Currently, the 'InsertAll' is generating a packed-statements of INSERT statement.

Let us say, you are inserting 10 rows of customer.

INSERT INTO [dbo].[Customer] (Name, SSN, Address, CreatedUtc, ModifiedUtc) VALUES (@Name, @SSN, @Address, @CreatedUtc, @ModifiedUtc);
INSERT INTO [dbo].[Customer] (Name, SSN, Address, CreatedUtc, ModifiedUtc) VALUES (@Name1, @SSN1, @Address1, @CreatedUtc1, @ModifiedUtc1);
...
INSERT INTO [dbo].[Customer] (Name, SSN, Address, CreatedUtc, ModifiedUtc) VALUES (@Name9, @SSN9, @Address9, @CreatedUtc9, @ModifiedUtc9);

It is more optimal to use it this way.

INSERT INTO [dbo].[Customer] (Name, SSN, Address, CreatedUtc, ModifiedUtc)
VALUES
(@Name, @SSN, @Address, @CreatedUtc, @ModifiedUtc),
(@Name1, @SSN1, @Address1, @CreatedUtc1, @ModifiedUtc1),
...
(@Name9, @SSN9, @Address9, @CreatedUtc9, @ModifiedUtc9);

Acceptance Criteria

  • The Unit Tests for SQL Builder must be rewritten.
  • Ensure that the Integration Tests are all passing.
@mikependon mikependon added todo Things to be done in the future optimization An optimization task performance A performance related task/feature labels Jan 25, 2020
@mikependon mikependon self-assigned this Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization An optimization task performance A performance related task/feature todo Things to be done in the future
Projects
None yet
Development

No branches or pull requests

1 participant