SQL Stats Pattern for JDBC Batch Processing
 Case Study Summary

The following example describes a case scenario of identifying the SQL stats pattern for a SQL statement when it is involved in JDBC batch processing.

The list of steps include:

 Step 1 : Identify the SQL statement with high elapsed time

During performance trouble shooting, one SQL statement stood out with high elapsed time.

 Step 2 : Check SQL text and SQL plan

After reviewing the SQL text and SQL plan, we found out that is a ‘insert’ statement.

 Step 3 : Check SQL stats to identify the pattern

The assumption is that one ‘insert’ statement can have one row processed (‘inserted’). Therefore, we expected SQL stats should have its executions be the same value as rows processed. However, we found out there is quite a big difference. Why?

 Step 4 : Check application code to confirm the pattern

As we further drilled down the code, we noticed the JDBC batch processing code, which explained the gap between executions and rows processed.

Copyright © 2011 Actrace. All Rights Reserved.
Home | Product | Case Study | Support | Download | Contact Us