GithubHelp home page GithubHelp logo

Comments (7)

JonathanMagnan avatar JonathanMagnan commented on June 4, 2024

Hello @ElenaShlykova,
Thank you for reaching out to ZZZ Projects, due to the holiday vacation we will have limited email access which may cause some delays from December 23 to January 2.
We are sorry for any inconvenience.

from dapper-plus.

JonathanMagnan avatar JonathanMagnan commented on June 4, 2024

Hello @ElenaShlykova ,

The current error looks to be caused by a timeout.

Approximately how long does it takes without this nvarchar(max) column/with this column but without the auditing, and do you know if there is something such as a trigger that could explain why this is so long?

Is it possible for you to reproduce it in a standalone project that contains the minimum code so we can try it? We already have multiple unit test with a nvarchar(max) column, so there is surely something we are missing here. You can send the project in private here if needed: [email protected]

Best Regards,

Jon

from dapper-plus.

ElenaShlykova avatar ElenaShlykova commented on June 4, 2024

It looks like the problem is in the generated sql. I got sql generated by dapper.plus using SqlProfiler and got the same error while running this script in Microsoft Sql Management Studio.
This is the SQL:

exec sp_executesql N'MERGE INTO [mytable]  AS DestinationTable
USING
(
SELECT TOP 100 PERCENT * FROM (SELECT @0_0 AS [id], @0_1 AS ZZZ_Index) AS StagingTable ORDER BY ZZZ_Index
) AS StagingTable
ON DestinationTable.[id] = StagingTable.[id]
WHEN MATCHED   THEN
    DELETE
OUTPUT
    $action,
    StagingTable.ZZZ_Index,
	DELETED.[payload] AS [payload_zzzdeleted]

;',N'@0_0 bigint,@0_1 nvarchar(19),@0_2 int',@0_0=20466,@0_1=0

This is like a Sql server limitation and it throws an error if we have a huge column in the output. It works once I removed the payload column from the output.

I also found a workaround with dapper.plus. Everything works if I set ForceSelectOutput = true for bulkOperation. In this case, a temporary table is used to retrieve the old values. Please let me know if this is the best solution.

from dapper-plus.

JonathanMagnan avatar JonathanMagnan commented on June 4, 2024

Thank you for reaching out to ZZZ Projects, due to the holiday vacation we will have limited email access which may cause some delays.
We are sorry for any inconvenience.

from dapper-plus.

JonathanMagnan avatar JonathanMagnan commented on June 4, 2024

Hello @ElenaShlykova ,

Thank you for the additional information. We will look more into it and why it happens.

Surely meanwhile, ForceSelectOutput is a great solution. As you probably already have seen, it will OUTPUT values in a variable table before selecting them after.

I will try to give you an update very soon

from dapper-plus.

JonathanMagnan avatar JonathanMagnan commented on June 4, 2024

Hello @ElenaShlykova ,

We are probably missing something, but my developer was not able to reproduce it. We tested multiple various difference scenarios with very large content, and outputting directly or in a table was pretty much the same performance (mostly 1-3% difference)

Do you think you could create a runnable project / or providing SQL script that reproduce this performance issue? It doesn’t need to be your project, just a new solution with the minimum code to reproduce the issue. You can send it in private here: [email protected]

from dapper-plus.

JonathanMagnan avatar JonathanMagnan commented on June 4, 2024

Hello @ElenaShlykova

Unfortunately, since we didn't hear from you I will close this issue.

As previously mentioned, we need a runnable project to be able to assist you.

We will reopen the issue if a project is received.

Feel free to contact us for questions, issues or feedback.

Best Regards,

Jon

from dapper-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.