Identifying Patterns in a Workload

To identify patterns in a workload, use the FindPatterns program. FindPatterns is a Java program that reads data from a captured workload (this data must be generated by the LoadInfo program) and its corresponding workload model (the workload model must be generated by the BuildModel program), and identifies frequent template patterns that occur in the workload.

The FindPatterns program uses the following syntax:

java oracle.dbreplay.workload.intelligence.FindPatterns -cstr connection_string -user username -job job_name -t threshold

java oracle.dbreplay.workload.intelligence.FindPatterns -version

java oracle.dbreplay.workload.intelligence.FindPatterns -usage

The FindPatterns program supports the following options:

  • -cstr

    Specifies the JDBC connection string to the database where Workload Intelligence stores the information and intermediate results required for execution (for example, jdbc:oracle:thin@hostname:portnum:ORACLE_SID)

  • -user

    Specifies the database username. The user must have certain privileges for using Workload Intelligence.

    For information about creating a database user with the appropriate privileges, see "Creating a Database User for Workload Intelligence".

  • -job

    Specifies a name that uniquely identifies the Workload Intelligence job.

  • -t

    Specifies a threshold probability that defines when a transition from one template to the next is part of the same pattern or the border between two patterns. Valid values include real numbers in the range [0.0, 1.0]. Setting this value is optional; its default value is 0.5.

  • -version

    Displays the version information for the FindPatterns program.

  • -usage

    Displays the command-line options for the FindPatterns program.

Example 14-4 shows how to identify frequent template patterns in a workload using the FindPatterns program.

Example 14-4 Identifying Patterns in a Workload

java -classpath $ORACLE_HOME/rdbms/jlib/dbrintelligence.jar:
$ORACLE_HOME/rdbms/jlib/dbrparser.jar:
$ORACLE_HOME/jdbc/lib/ojdbc6.jar:
oracle.dbreplay.workload.intelligence.FindPatterns -job wijobsales -cstr
jdbc:oracle:thin:@myhost:1521:orcl -user workintusr -t 0.2