The Database Trace tool produces a text file containing the SQL statements, rule cache hit statistics, timings, and other data that reflect your requestor session's interactions with the Pega Platform database or other relational databases. You can select the database options that are traced. Familiarity with SQL is required to interpret the output.
- This tab is available only to users who hold the Code-Pega-.PerformanceTool privilege.
- Additional database statistics are displayed by the Performance Analyzer. For more information, see Database access counts.
- In the header of Dev Studio, click .
- Click Trace Options. The following trace options are available:
Label Log Event Add Batch each add batch operation. Prepared Statement Query each query (SQL database read) operation. Prepared Statement Update each update (SQL database insert, update, or delete) operation. Prepared Statement all three types of prepared statements:
Each read, update, or delete operation requested by the Pega Platform server results in a prepared statement query sent to the Pega Platform database.
Get Database Metadata each check of the rule cache.
Checks typically occur first time that a table is accessed after startup and before read operations.
Read blob each time the Storage Stream column (pzPVStream) in a row is read. The size of the entry in the column is also reported. Write blob each time Storage Stream column (pzPVStream) in a row is written. Commit each time an internal database commit operation completes. (This is not directly related to the Pega Platform Commit method.) Rollback when a PRPC Commit operation is in process but a database rollback operation occurred. Close Connection when a connection is explicitly closed. Assign Connection to Thread when a database connection in a pool is reassigned to a new requestor thread. Cache Hit (found) when a rule cache hit occurred and the requested row was found. Cache Hit (not found) when a rule cache hit occurred and the requested row did not exist. (For rules, the database cache records both the requests not found and successful requests.) Cache Miss when a rule cache miss occurred. Run List when a list rule (Rule-Obj-List rule type) was processed by the Obj-List method in an activity. List Result Count when a list rule completed and indicates the number of rows returned. Activity Start when an activity execution starts. Activity End when an activity execution completes. Assembly Start when rule assembly starts. Assembly End when rule assembly ends. Get Document From Bucket when a Couchbase document is retrieved from a bucket. Note: This is only applicable for a Couchbase database. Save Documents To Bucket when a Couchbase document is saved to a bucket. Note: This is only applicable for a Couchbase database.
- Click Trace to turn on tracing for the selected operation. Select only the minimal set of options that are required to aid your debugging.
- Optional: Click Generate stack trace to generate a full Java stack trace.
- Click Submit. The system saves this information in the
pyDBTraceSettingspage within your requestor page.
- To start tracing, on the Database Trace tab, click the Click to Start icon (green arrow).
- Viewing database trace results in Excel
The Database Trace tool produces a text file containing the SQL statements, rule cache hit statistics, timings, and other data that reflect your requestor session's interactions with the Pega Platform database or other relational databases. You can export this file to Microsoft Excel to view the results.
- Generating a system-wide database trace
As an alternative to using the Database Trace tool, you can trace system-wide database statistics. As a best practice, do this for very short periods on a non-production system.