Issue Details (XML | Word | Printable)

Key: CORE-820
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: rdebay
Votes: 3
Watchers: 3

If you were logged in you would be able to see more operations.
Firebird Core

isc_dsql_exec* should allow list of parameter sets

Created: 15/Mar/05 12:00 AM   Updated: 25/Oct/18 12:38 PM
Component/s: API / Client Library
Affects Version/s: None
Fix Version/s: None

Issue Links:

SF_ID: 1164037

 Description  « Hide
SFID: 1164037#
Submitted By: rdebay

JDBC has a feature called batched statements. To put it simply, an SQL statement is prepared, sets of parameters are added to the batch, and then the batch is executed.

Currently, Jaybird takes the list of parameter sets, and executes each one with isc_dsql_exec2. Other databases have APIs that allow the entire list of parameter sets to be sent across, and the server then loops through them, executing each one in turn against the prepared SQL statement.

This greatly reduces wire traffic, with equally large gains in performance.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
TIP Group, S.A. (Olivier Mascia) added a comment - 10/Nov/14 09:33 PM
This imply a batch of results too. What if the statement is a SELECT, the results sets are batched too? What about failures (one of the exec instances could trigger errors - depending on the parameter values). How would it be expected to behave?

Thomas Kragh added a comment - 24/Jun/17 09:59 PM
I can see in the planning bord and in the git repository that hvis feature i under development at the moment. Out of curiosity, will this new batch feature make it possible to execute multiple select statements in a single roundtrip to the database?

for example
select * from houses where owner = @ownerid
select * from cars where model = @modelnr

Alexander Peshkov added a comment - 25/Jun/17 09:12 AM
In v4 - definitely not. Primary goal is to support JDBC requirements. May be an ability to execute select statement with parameters sending sets of different parameters' values in a batch will be added in v4 too, but what about execution of different select statements with different sets of output columns that requires changing a way we work with result sets and is out of v4 scope.

Alexander Peshkov added a comment - 23/Oct/17 02:17 PM
Implemented new Batch interface performing everything needed for JDBC compliance and additionally:
- detailed information about error happened when processing particular message in batch,
- ability to use BLOBs in batches (efficient in a case of relatively small blobs).