Query Manager
Table of contents
Overview
Query Manager is a view that shows the history of all SQL queries that DBeaver has executed during the current session.
Note: DBeaver saves query history after restarting only in Lite, Enterprise, Ultimate and Team editions.**
To open the Query Manager, do one of the following:
Click the arrow next to the Transaction Log button in the toolbar and then click Query Manager on the dropdown menu:
On the Window menu, click Show View -> Query Manager:
The Query Manager logs all queries together with their execution statistics (execution time, duration, number of fetched/updated rows, errors, etc.):
You can modify the look of the Query Manager by filtering queries and setting the number of entries displayed per page, as well as specifying some storage settings. See the ‘Query Manager Properties’ section below.
To erase all entries from the Query Manager, click the Clear query manager log button () in the view`s toolbar. In DBeaver PRO versions, you can also open Help —> Clear History in the main menu and select Query log history option. The query history will disappear after the restart.
Query Manager Properties
To manage the look of the Query Manager, filter the entries, and modify the storage settings, click the Set query manager filter button () in the view`s toolbar. The Properties for Query Manager window opens:
- Select or clear the checkboxes in the Object Types section to filter entries by object type. To filter entries by query type, select clear the checkboxes in the Query Types section.
- To change the max number of entries displayed, enter the new number in the Max number of records to show field.
To set DBeaver to save the query log in a file, select the Save log to file(s) checkbox and then specify the file location in the Log files folder field.
Cleanup old records
DBeaver provides an option to automatically remove old query history records. To enable this feature:
- Navigate to Window -> Preferences -> General -> Query Manager -> SQL History Database
- Select the Cleanup old records checkbox.
- Specify the Days to keep history. It will retain only the records from the specified number of days and delete older entries.
- Restart the DBeaver.
Tip: If you set Days to keep history to 1, DBeaver will retain only the records from the last day, removing everything older than that during cleanup.