skip to main content
Getting Started : Advanced Features : Using Statement Pooling
  
Using Statement Pooling
Most applications have a certain set of SQL statements that are executed multiple times and a few SQL statements that are executed only once or twice during the life of the application. Similar to connection pooling, statement pooling provides performance gains for applications that execute the same SQL statements multiple times over the life of the application.
A statement pool is a group of prepared statements that can be reused by an application. If you have an application that repeatedly executes the exact same SQL statements, statement pooling can improve performance because the database server does not have to repeatedly parse and create cursors for the same statement. In addition, the associated network round trips to the database server are avoided.
You can use the DataDirect Statement Pool Monitor to load statements into and remove statements from the statement pool as well as generate information to help you troubleshoot statement pooling performance. The Statement Pool Monitor is an integrated component of the drivers. It is implemented as a Java Management Extensions (JMX) MBean. Applications can access the Statement Pool Monitor using the standard JMX API or using methods in the DataDirect-specific ExtConnection interface. Because the Statement Pool Monitor is implemented as a JMX MBean, it can easily be used by any JMX-compliant tool, such as JConsole.
Refer to "Statement Pool Monitor" in the DataDirect Connect Series for JDBC Reference for more information about managing statement pools with the DataDirect Statement Pool Monitor.