27 Query Manager
dbeaver-devops edited this page 2026-01-30 09:38:13 +00:00

Table of contents

The Query Manager provides a comprehensive view of all SQL queries executed in DBeaver. 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.

Note

in Lite, Enterprise, Ultimate, and Team Editions.

To access the Query Manager:

  • Go to Window -> Show View -> Query Manager in the DBeaver's menu bar.
  • Alternatively, click the arrow next to the Transaction Log button in the DBeaver'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.

Clearing query history

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

  • In Community Edition, the query history is automatically deleted after a restart.
  • You can clear history manually by going to Help -> Clear History and selecting Query Log History.