4 ms·
Why on earth would you need more than 2000 parameters?
by NackerHughes 5y ago
Why on earth would you need more than 2000 parameters?
- magicalhippo 5y agoThe list I pass to IN can have than 2000 entries, and if I were to use parameters and my database doesn't support array parameter as mentioned... As for why more than 2000 entries in a IN list, well, some customers generate a fair bit of data, and our program allows for bulk updating via pasting from Excel or similarly tabulated data. Depending on the case, it's necessary to grab all the entries from the db and work on them as a batch, rather than one-by-one.
- alexvoda 5y agoWhy not pass that as json or xml and then join the data?
- magicalhippo 5y agoFor our DB that would require a temporary table, in which case we could just do a LOAD TABLE statement. But we do do that as well, but it's a lot more overhead than just setting a single parameter, or macro when using IN.