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

Hints for sql server #93

Open
ghost opened this issue Jun 14, 2021 · 4 comments
Open

Hints for sql server #93

ghost opened this issue Jun 14, 2021 · 4 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jun 14, 2021

Hello there.

We have encountered the deadlock while using BulkInsert from DapperPlusActionSet. The deadlock is happened due to the concurrent update of the parent table and insert to a child table in few different transactions. The possible way to fix the issue is to use the SQL server hint for the insert query: OPTION (LOOP JOIN). However, I did not find any way to specify the hint while using dapperplus methods.

Is there a way to specify SQL server hints for insert statement located in the merge statement produced by the BulkInsert method?

Thanks.

@JonathanMagnan JonathanMagnan self-assigned this Jun 14, 2021
@JonathanMagnan
Copy link
Member

Hello @rodale ,

There is currently no way to specify hint but I will talk with my developer tomorrow about this request.

Best Regards,

Jon

@JonathanMagnan
Copy link
Member

Hello @rodale ,

I speak with my developer and we are not sure exactly where you will put the option OPTION (LOOP JOIN).

Our library uses the MERGE statement and not an "INSERT SELECT + INNER

Is it possible for you to provide an example of syntax? We want to make sure that's possible and it will currently work with the way we already generate our SQL.

Best Regards,

Jon

@JonathanMagnan
Copy link
Member

Hello @rodale ,

Since our last conversation, I haven't heard from you!

As mentioned in my previous message, we are not sure exactly where you will put the option OPTION (LOOP JOIN).

Don't hesitate to provide an example of syntax so we can assist you better.

Looking forward to hearing from you,

Jon

@JonathanMagnan
Copy link
Member

Hello @rodale ,

A simple reminder that we are here to assist you!

Don't hesitate to provide an example of syntax so we can help you better.

Looking forward to hearing from you,

Jon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant