Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Database Bulk functions enable you to bundle multiple queries into one SQL statement. This significantly improves the throughput due to reduced need of context switching and network traversals. The functions are intended for batch usage only. 

All functions without the parameter disableCommit will be auto commit after the function has executed.

Making an SQL Query

When making an SQL query it must follow a certain format and the order of the columns in the query must remain the same in the statement as in the where_clause.

...

Code Block
any sqlBulkPrepareStatement
(string  dbProfile ,
string  statement ,
string  static_where_clause ,  //set to null if not present
string  where_clause ,
int  bulkSize ,
int  significantColumns ,
int  totalColumns ,
int  timeout ,  //Optional
@Deprecated boolean autoCommitdisableCommit ,  //Optional)


ParameterDescription

dbProfile

Name of the database where the table resides

statement

Statement to send to the database

static_where_clause

The static_where_clause of the SQL statement stays the same throughout the batch mode execution

where_clause

The where_clause of the SQL statement principal.

The where_clause columns that are to be considered significant must correspond with the columns in the select statement. For example, when statement reads "select A, B and C from X", where A and B is significant, the where_clause must begin with "A=? and B=?".

bulkSize

The size of the bundled lookup SQL query, that is the number of UDRs with a unique UDR key to be bundled. The ideal bulkSize depends on database table characteristics such as structure and number of rows.

significantColumns

This parameter indicates which columns in the select statement are significant to tie a result row to its context (UDR).

All columns to be used as significant columns must be included in SQL search condition, and they must be used in the same order as in the search condition. For example, when using an incoming UDR as context and a search condition matching its IMSI field, using significant columns = 1 ties all matching rows to this UDR, namely, all rows with the same IMSI as that carried by the UDR.

totalColumns

The total number of columns in the statement

timeout

The least time interval, in milliseconds, the workflow will allow before a database bulk lookup will be done

autoCommit

disableCommit

(Deprecated since PE 4.3)

An optional parameter to enable disable the commit statement to from being performed at the end of every SQL transaction for this particular function. Setting this parameter to false will result in no the commit statement to be performed at the end of every SQL transaction for this particular function. By default,  will will have the autoCommit disableCommit set to true unless otherwise changed via this parameter.

Info

It should be noted that on recent Oracle versions, the DBLink SQL transaction behaviour has changed, where every single SQL statement for remote database transaction requires a commit or rollback statement in order to close a connection.

In addition, PostgreSQL users should set this to false as every statement needs to be committed. 


Returns:

The returned object is a “Prepared Statement” object containing the added parameters, a prepared result list and a maintained contexts list. This object is a mandatory parameter to the sqlBulkExecuteQuery() function and is needed for the execution of the SQL query.

...