Improve execution of parameterized SQL statements with arrays of parameters by sendin...
authorHiroshi Inoue <h-inoue@dream.email.ne.jp>
Mon, 18 May 2020 10:53:48 +0000 (19:53 +0900)
committerHiroshi Inoue <h-inoue@dream.email.ne.jp>
Wed, 20 May 2020 04:56:36 +0000 (13:56 +0900)
commit26b30efd0cf93478be68218090435f995809e546
tree24444ce41cdfcc1b8ea116f03915610e99057e27
parent241f4578ec878a0bd9cad3a6a539059860c18d14
Improve execution of parameterized SQL statements with arrays of parameters by sending chunks of SQL statements.
If SQL_ATTR_CURSOR_TYPE of an statement is SQL_CURSOR_FORWARD_ONLY, SQL_ATTR_CONCURRENCY is SQL_CONCUR_READ_ONLY and extended protocol isn't used, the batch execution of the statement is possible.
A new option Batch Size was introduced for such cases.
 Batch Size: Split an array (of parameters) into chunks of Batch Size to execute statements. The last chunk may contain less than Batch Size elements. Setting 1 to this option forces the current one by one execution.

Also turn off use_server_side_prepare option temporarily when batch executuion is possible.
16 files changed:
connection.c
connection.h
descriptor.c
dlg_specific.c
dlg_specific.h
dlg_wingui.c
docs/config-opt.html
docs/config.html
execute.c
pgapi30.c
pgapifunc.h
psqlodbc.h
psqlodbc.rc
resource.h
statement.c
statement.h