Query Analyzer Tool
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 sessionSupports saving JSON output to a file or displaying it in the console window, because the database statistics are serialized to JSON
Supports providing SQL (Structured Query Language) 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 following type if the tool can resolve the type; otherwise
unknown
, if the type cannot be resolved:Create
Read
Delete
Link
- 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