Team Edition Documentation

DOWNLOAD pdf

Query Manager

Overview

The Query Manager provides a comprehensive view of all SQL queries executed in Team Edition. It logs queries along with execution details such as execution time, duration, affected rows, and errors.

The Query Manager allows you to:

  • Show or hide session, transactions, and queries.
  • Store query logs in a file and configure the number of displayed records.
  • Filter queries by type, time range, connection, catalog, or schema.
  • Manage SQL history by defining storage settings and enabling automatic cleanup.
  • Clear query history manually or configure automatic deletion.

To access the Query Manager:

  • Go to Window -> Show View -> Query Manager in the Team Edition's menu bar.
  • Alternatively, click the arrow next to the Transaction Log button in the Team Edition's toolbar, then select Query Manager from the dropdown.

Properties

To customize the Query Manager view, open the context menu in the Query Manager view or go to Window -> Preferences -> Query Manager.

Option Description
User queries Display queries manually executed by the user.
Filtered user queries Show queries that match specific filter criteria.
User scripts Include SQL scripts executed by the user.
Utility functions List internal system functions used by the database.
Metadata read Show queries that retrieve database metadata.
Metadata write (DDL) Display queries that modify the database structure.
Sessions Show active database sessions.
Transactions Display database transactions.
Queries Include executed SQL queries.

Tip: Click the Refresh button in the toolbar to update the Query Manager and see the latest queries.

Query log storage and display settings

To store query logs in a file and control how many entries appear in the Query Manager, configure the settings in Window -> Preferences -> Query Manager.

Setting Description
Max number of records to show Sets the maximum number of query log entries displayed in the Query Manager.
Save log to file(s) Enables query log storage. Select this option and specify the folder in Log files folder.
Log files folder Defines the location where query logs are saved.
Days to store log Specifies how long logs are kept before being deleted.

Note: Changes to storage settings take effect only after restarting the application.

Filters

To filter queries in the Query Manager by time range, connection, catalog, or schema, open the filter settings:

  • Right-click in the Query Manager view and select Filters.
  • Click the Filters button in the toolbar.
Filter Description
Range from Shows queries executed after the selected date and time.
Range to Shows queries executed before the selected date and time.
Connection Filters queries by a specific database connection or shows all connections.
Catalog Filters queries by one or more catalogs.
Schema Filters queries by one or more schemas.

Once you've selected the filters, use the following buttons:

  • Apply Filters – Applies the selected filters and updates the query list.
  • Reset Filters – Clears all selected filters and restores the default view.

SQL history database

By default, Team Edition stores query history in a local database file. You can check its location in Window -> Preferences -> Query Manager -> SQL History Database or by clicking the Database settings button in the Query Manager's toolbar.

  • The Database path field shows the current location of the query history database (qmdb file).
  • This file (H2 database) contains all logged queries, their execution times, and related metadata.

Note: Modifying or deleting this file may result in losing the query history.

Cleanup old records

Team Edition provides an option to automatically remove old query history records. To enable this feature:

  1. Navigate to Window -> Preferences -> General -> Query Manager -> SQL History Database
  2. Select the Cleanup old records checkbox.
  3. Specify the Days to keep history. It will retain only the records from the specified number of days and delete older entries.
  4. Restart the Team Edition.

Tip: If you set Days to keep history to 1, Team Edition will retain only the records from the last day, removing everything older than that during cleanup.

Clearing query history

You can erase all entries from the Query Manager by clicking the Clear Log button in the view's toolbar.

  • You can clear history manually by going to Help -> Clear History and selecting Query Log History.