PrivateCommands
Determines if commands are shared between connections.
When multiple connections execute the same command, they access common command structures controlled by a single command lock. To avoid sharing their commands and possibly placing contention on the lock, you can use PrivateCommands
. This gives you better scaling at the cost of increased temporary space usage.
By default, the PrivateCommands
is turned off and commands are shared.
Required Privilege
No privilege is required to change the value of this attribute.
Usage in TimesTen Scaleout and TimesTen Classic
This attribute is supported in both TimesTen Classic and TimesTen Scaleout.
Setting
Set PrivateCommands
as follows:
Where to set the attribute | How the attribute is represented | Setting |
---|---|---|
C or Java programs or UNIX and Linux systems |
|
|
Windows ODBC Data Source Administrator |
Not applicable |
Note:
- If there are many copies of the same command, all of them are invalidated by a DDL or statistics change. Reprepare of these multiple copies takes longer when
PrivateCommands
= 1. With more commands DDL execution can take slightly longer. - When using the
PrivateCommands
attribute, memory consumption can increase considerably if the attribute is not used cautiously. For example, ifPrivateCommands
=1 for an application that has 100 connections with 100 commands, there are 10,000 commands in the system: one private command for each connection.