-
Notifications
You must be signed in to change notification settings - Fork 697
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
unecessary limit for OUTPUT command when using batch insert - mssql #440
Comments
Do I understand right that the limitation should be based on |
I used I couldn't find any limitation for output command on limit of columns returned, only for select, insert command for column passed = 4096 https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-2017 I was trying to insert 1000 rows to table which have 15 columns (i wrote in above comment 13 - my bad). As u can see by not valid So for me the limitation should be only on maximum number of passed rows in batch insert (as in mssql it is 1000 rows per one insert command (I tested it too) https://social.msdn.microsoft.com/Forums/sqlserver/en-US/bff53b3d-bf50-413f-891e-75af427394e2/limit-to-number-of-insert-statements-or-values-clauses?forum=transactsql) So the code: |
I don't use SQLServer and that's why I don't clearly understand the parameter limitation, so, for now, I think that |
From my perspective to get clean resolution between SQLServer dialect and this particular library there should not be limitation on something that don't exists. |
Does that means what an issue with performance degradation on inserting more than 1000 values in a single query stated here was resolved? |
Will be removed in 0.27.1 |
Exposed/src/main/kotlin/org/jetbrains/exposed/sql/statements/BatchInsertStatement.kt
Line 72 in e54fa34
output paramers are only ids. Don't know why even this limit is even implemented.
instead of:
if (paramsToInsert * (data.size + 1) > OUTPUT_PARAMS_LIMIT) {
it should by like:
if ((data.size + 1) > OUTPUT_PARAMS_LIMIT) {
or deleted
Run some tests with parameters(columns ) more than 13 for 1000 rows and it get inserted.
I know that it won't be optimum to insert 1000 rows at once for some cases as it is explained here: https://stackoverflow.com/questions/8635818/multiple-insert-statements-vs-single-insert-with-multiple-values/8640583#8640583
but that it is not the case i write for.
My problem is that some tables have more or less columns and this limit shouldn't even throw exception.
The text was updated successfully, but these errors were encountered: