-
Notifications
You must be signed in to change notification settings - Fork 5
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
Handle the 'maximum number of sql variables in an expression is 1000' error #34
Comments
In GitLab by @manuelma on Nov 28, 2018, 17:39 changed title from Handle {-maximum number of sql variables in an expression is 1000-} to Handle {+ the 'maximum number of sql variables in an expression is 1000' error+} |
In GitLab by @PvPer on Nov 29, 2018, 13:30
Added two tests about this. Every add method will have the same problem if you try to get all new parameter values. See |
In GitLab by @fabianoP on Dec 4, 2018, 12:50 My limit is 499 |
In GitLab by @manuelma on Dec 4, 2018, 12:56 ok, so we need to find a way to query the limit |
In GitLab by @fabianoP on Dec 4, 2018, 13:01 I think the problem is in the "IN" clause,the good workaround in this case is using a pagination technique. Basically what we do is we limit the data view by users dividing the views in pages of 100-400 records max. In this way we will never show more than the max number of record in a page. |
In GitLab by @manuelma on Dec 4, 2018, 13:12 It's clear, although this issue is not about viewing data, but rather about querying data for other purposes. Take a look at the |
In GitLab by @fabianoP on Dec 4, 2018, 13:24 I got it. Thanks! |
In GitLab by @manuelma on Dec 4, 2018, 13:33 Cool, and you have any idea how to find out this limit for a given engine/session/dialect? |
In GitLab by @fabianoP on Dec 4, 2018, 13:43 Need to do some test, but I think creating a temporary table and using an inner join could fix the problem: |
In GitLab by @manuelma on Dec 4, 2018, 15:47 I don't see how that solution works. We still need to select the items from the original table to insert them in the temporary table, and for that we need the IN clause. The solution we have now is almost good, we just need to figure out the right limit. We can hard-code the limit to 499 to be safe, or even to something like 99 if we want to be ultra-safe. Alternatively, we could run a mock-up query to figure out what the limit is for a particular case. Edit: or am I missing something??? |
@manuelma is this issue still valid? |
In GitLab by @manuelma on Nov 28, 2018, 17:14
This happens when committing large changes.
The text was updated successfully, but these errors were encountered: