Revision as of 14:09, 5 September 2016 by Jis (Talk | contribs)

Profiling SQL Queries

This page describes the SQL Queries profiling mode.


The SQL Queries profiling mode tracks SQL queries executed using the JDBC API, execution times, invocation counts and call trees, enabling to analyze the traffic between a Java process and database instance. Use this profiling mode to realize what queries are being executed and identify performance bottlenecks or bad design patterns like not using prepared statements. See First Profiling Session for details on starting a profiling session.

SQL Query Profiling Modes

Profiling modes

Two modes are available for profiling SQL queries. The modes and settings can be changed in the Settings pane which is displayed by pressing the Settings switch in Profiler window toolbar.

  • All queries collects all executed SQL queries. This mode is selected by default and doesn't require any additional configuration.
  • Defined queries collects executed SQL queries containing the provided case-insensitive substring.

Toolbar Buttons

  • Pause live results allows to stop updating live results. Pressed automatically when a context menu is displayed for the profiling results.
  • Update live results is enabled when the Pause live results is pressed, allows to manually update paused live results.
  • Show delta/absolute values controls switching between absolute and incremental values.
  • Take snapshot saves the currently available profiling data to a file which can be reopened later for offline analysis or compared with another snapshot.
  • Reset results clears the currently available profiling data, enabling to start collecting new data from a defined point.
  • Take thread dump action takes snapshot of all threads in the profiled JVM including their call stacks and displays it in a separate view. See the Thread Dump chapter for details.
  • Take heap dump action saves a snapshot of all objects currently stored in the heap memory in a .hprof format and optionally opens it in a heap viewer. See the Heap Dump chapter for details.
  • Request garbage collection action requests garbage collection in the profiled JVM. There's no guarantee when or if at all the garbage collection will be performed. To make sure GC will be run, the action should be invoked several times.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo