Comments (7)
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.
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.
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.
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.
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.
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.
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)
- Adding a list property to another table HOT 2
- Optimal batch size for SQL Server HOT 9
- Received an invalid column length from the bcp client for colid HOT 3
- Set ColumnSynchronizeDeleteKeySubsetExpression without .Entity<Whatever>()? HOT 4
- IndexOutOfRangeException on BulkMerge operations HOT 1
- ILogger not logging, but Console.WriteLine works? HOT 3
- Configure Merge for concurrency handling HOT 3
- Ids not coming back after first BulkInsert HOT 4
- Update trigger on target table causes BulkMerge to fail HOT 3
- Feature Request - suppress update if nothing changed. HOT 2
- BulkInsert doesn't generate primary key for multiple concurrent submission HOT 7
- Support for Sybase for Bulk Insert HOT 1
- Skip duplicate records on bulk insert HOT 5
- Avoid output HOT 7
- BulkInsert Postgres => An error occured while retrieving the InformationSchemaTable information. See the inner exception for details. HOT 4
- Dapper Plus can't map Id when use galera cluster HOT 3
- bulk insert very slow on mariadb version≥10.6.0 HOT 2
- PostgreSQL BulkMerge / BulkUpdate always returns all rows as update HOT 6
- Bulk Insert throws the exception 'Unknown data type' whenever inserting GUID to MySQL HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dapper-plus.