Set concurrency properties for database, public window, and remote service entries.
By default, Sybase CEP Engine establishes a separate connection with a database, public window, or RPC server for every CCL query that requires such a connection. Concurrency preferences enable you to override this default behavior by allowing multiple CCL queries using the same service to share a single connection, or by using several connections to process a single query.
Concurrency settings apply only to direct CCL connections to a database, public window, or RPC server. Adapters do not use these preferences. The two preferences used to specify concurrency preferences are:
"MaxPoolSize".
"MaxParallelInvocationsPerCall".
The "MaxPoolSize" preference establishes a pool within which multiple CCL queries may share a single connection to the RPC server, public window, or database server specified by the service entry. The "MaxPoolSize" indicates the maximum number of permitted connections that all queries running at the same time on a single Sybase CEP Server instance share. The maximum pool size is 1024. A "MaxPoolSize" of 0 indicates an unlimited pool. This is the default maximum size of the pool setting.
The following example establishes a maximum pool size per Sybase CEP Server instance per service entry of ten.
<Param Name="MaxPoolSize">10</Param>
The "MaxParallelInvocationsPerCall" preference allows you to distribute the processing of a single query over multiple connections to the database server, public window or RPC server specified by the service entry. "MaxParallelInvocationsPerCall" establishes the maximum number of connections per service entry that a Sybase CEP Server instance can use to process a single CCL query. You can specify a preference with a range of integer values from 1 to 1024. The default value is 1.
The following example allows up to three concurrent connections for a single database subquery or remote subquery.
<Param Name="MaxParallelInvocationsPerCall">3</Param>
Sybase CEP Engine uses concurrent query execution settings only for CCL database subqueries and remote subqueries, which retrieve data from the remote server, database, or public window. CCL Database Statements and Remote Procedure Statements, which write information to the database, or remote service, do not use these settings.
The following table shows connection behavior with various combinations of "MaxPoolSize" and "MaxParallelInvocationsPerCall" settings. In all cases, the table specifies established and dropped connections per Sybase CEP Server instance per service (that is, per CCL statements using the service and running on a single Sybase CEP Server instance).
"MaxPoolSize" Setting |
"MaxParallelInvocationsPerCall" Setting |
Connections Established |
0 (default setting -- unlimited pool) |
1 (default setting) |
A single new connection for every CCL statement that uses the service. |
0 |
X (where X is an integer between 2 and 1024) |
X new connections for every CCL database subquery or remote subquery that uses the service. A single new connection for every CCL Database Statement or Remote Procedure Statement that uses the service. |
Y (where Y is an integer between 1 and 1024) |
1 |
A single new connection for every CCL statement that uses the service, up to the specified Y maximum. Any of the connections in the pool are available to any statement, but a single statement may use only one connection at any given time. |
Y (where Y is an integer between 1 and 1024) |
X (where X is an integer between 2 and 1024) |
X new connections for every CCL database subquery or remote subquery that uses the service, up to the specified Y maximum. A single new connection for every CCL Database Statement or Remote Procedure Statement that uses the service, up to the specified Y maximum. Any of the connections in the pool are available to any statement, but a given database subquery or remote subquery may use only X connections at any given time, and a given Database Statement or Remote Procedure Statement can only use one connection at a time. |