Apply bulk processing to inserts where arraysize=1 and Enable Bulk Load is turned on.

  • Thread starter Thread starter timk
  • Start date Start date
Status
Not open for further replies.
T

timk

Guest
1. The nature of the enhancement required specifying what should be changed or implemented. Currently the driver is documented that it will use bulk processing when parameter arrays are used for insert and the driver setting for Enable Bulk Load is set to 1. Elsewhere in the documentation, a limitation is provided, for the case where arraysize=1. In that event, the driver does a normal insert, not using bulk load features. This request is to change the driver so that the driver does an insert using bulk load processes for all arraysize values. 2. The use cases for the proposed idea (enhancement) specifying the added functionality of the product as a result of the proposed enhancement. There are processes that the driver performs "under the covers" for array processing when Enable Bulk Load is turned on. One of those is to ignore identity columns in the insert so that if the DB does not allow inserts into that column, then the driver won't try to insert there, but the remainder of the columns will be processed. Currently, if the user has specific Enable Bulk Load, then does several array inserts into a table containing an identity column, the inserts all work. If the user then does an array insert with the arraysize=1, the driver attempts to insert the row with the identity column included. If the DB does not allow the insert into the identity row (which is the most common scenario) then the insert will fail. Changing the driver to allow bulk processing on inserts where arraysize=1 will keep this unexpected failure from occurring. 3. The current alternatives or workarounds for the proposed idea (enhancement), if such alternatives exist, and why these are not desirable. Without this enhancement, even though the application has turned on Enable Bulk Processing, it will have to determine the times when it is doing an array insert but the number of rows = 1, then use normal insert processing as opposed to allowing the driver to process the insert in the same way that it has processed inserts when arraysize 1. This enhancement could keep this additional checking and code path out of the customer's application. Additionally, it would avoid possible errors when customers don't see the arraysize=1 restriction in the bulk load documentation. It seems like the design for this was intentional, with the thought that it doesn't provide any performance benefit for the driver to use bulk load processing when arraysize=1, but as in the scenario above, there's a good reason for doing this. Without it, the performance penalty is paid, anyway, by the app, so the performance result equals out.

Continue reading...
 
Status
Not open for further replies.
Back
Top