MySQL Query Execution History

The Execution History feature of dbForge Studio for MySQL allows you to view the full list of all executed MySQL queries, easily locate the required one, edit and re-execute it, if required. This short article describes how to setup and use the MySQL Execution History feature.

Setting Up Execution History Behavior

To customize the MySQL Execution History behavior, click Options in the Tools menu. Then, navigate to Environment, Documents, Execution History.

The window allows you to:
  • Enable/disable tracking of execution history.
  • Setup the number of days to store executed queries.
  • Configure maximum script size to store.
  • Customize output of the execution history at startup.
  • Specify the location of the folder storing execution history.
  • Clear execution history.

Using Execution History

To open the Execution History window, click Execution History on the SQL toolbar. Alternatively, point to Other Windows in the View menu, and then click Execution History. You can also press Ctrl, Alt, H to open the Execution History window.

Execution History Window

The Execution History window shows a list of executed queries with the following details:

  • Execution status indicating whether query was executed successfully, or not.
  • Query Text.
  • Query size in bytes.
  • Execution timestamp.
  • Execution duration.
  • Name of the query file.
  • Name of the sever against which the query was executed.
  • Name of the database against which the query was executed.
  • Name of the user who executed the query.
Also, the window shows DDL of the selected query.

Locating Query

To quickly find a required MySQL query in the list, you can:

  • Type the search string into the Search box and specify query execution time span.
  • Sort, group and filter execution data by columns.

Editing and Re-executing Executed Query

To edit or re-execute the executed query, you can:

  • Right-click a query in the list and click To new SQL window or To clipboard. Depending on your choice, the selected query will be opened in a new SQL window, or be copied to clipboard.
  • Right-click anywhere in the DDL text section of the Execution History window, and click Edit on the shortcut menu. The query will open in a new SQL window, where you can edit and re-execute it.

Conclusion

As you can see, there is nothing easier than tracking executed MYSQL queries with the Execution History feature of dbForge Studio for MySQL. You can customize the Execution History behavior up to your needs, sort, group and filter the query list as well as edit and re-execute the required MySQL query.