LinkedIn
Copied!

Table of Contents

Starting a database trace

Version:

Only available versions of this content are shown in the dropdown

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.
Operating this tool can adversely affect performance, and can produce a large volume of output. Use this tool only in appropriate non-production debugging environments, for short periods.
  1. In the header of Dev Studio, click Configure System Performance Database Trace .

  2. 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.
    This is only applicable for a Couchbase database.
    Save Documents To Bucket when a Couchbase document is saved to a bucket.
    This is only applicable for a Couchbase database.
  3. Click Trace to turn on tracing for the selected operation.

    Select only the minimal set of options that are required to aid your debugging.
  4. Optional:

    Click Generate stack trace to generate a full Java stack trace.

  5. Click Submit.

    The system saves this information in the pyDBTraceSettings page within your requestor page.
  6. 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.

Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.