Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Overview

Overview

You can use the Query Analyzer tool, ep-query-analyzer, to get detailed information about the database queries executed with each Cortex operation. You can use this tool during the development to analyze potential performance problems related to database requests and before and after re-factoring.

Features

  • Supports using as an OSGi bundle or command line tool.

    Enables TRACE level logging automatically using JMX when you start the tool when used as an OSGi bundle.

  • Clears ep-cortex.log automatically before each logging session.
  • Supports saving JSON output to a file or displaying it in the console window, because the database statistics are serialized to JSON.
  • Supports providing SQL queries as a single line with embedded parameters.
  • Provides the following statistics:
    • Total database calls.
    • Total JPA calls.
    • Total time spent in database calls.
    • Total number of operations, such as, total number of operations with JPA calls and total number of operations without JPA calls, with the details.
    • Total database calls per table by displaying the list of tables and number of database calls in descending order.
    • Total JPA calls per entity by displaying the list of entities and number of JPA calls in descending order.
    • Total database calls per operation with the list of operations and number of database calls in descending order.
    • Total JPA calls per operation with the list of operations and number of JPA calls in descending order.
    • Total time spent in database calls per operation with the list of operations and total time spent in database calls in descending order.
    • List of operations.
  • Supports two types of operations, such as operations with JPA calls sorted in descending order and operations without JPA calls.
For each operation, the following details are available:
  • The type, such as Create, Read, Delete,or Link, if the tool can resolve the type or unknown, if the type cannot be resolved.
  • The URI.
  • The thread name.
  • The time stamp.
  • The total database calls per table per operation with the list of tables and number of database calls in descending order.
  • The total JPA calls per entity per operation with the list of entities and number of JPA calls in descending order.
  • The list of JPA queries.

For each JPA query, the following details are available:

  • The query in a single line.
  • The list of eager relations.
  • The list of SQL queries with a time stamp when the query is run.

For each SQL query, the following details are available:

  • The query.
  • The number of JOINs, all types.
  • The execution time.