


To evaluate an SQL expression, right-click the expression and click Execute -> Evaluate SQL expression on the context menu. You can click the rows of the execution plan to see their details (statistics) in the panels below and to the right of the plan.To reevaluate the plan, click the Reevaluate button ( ).To see the source script on which the plan is based, click the View Source button ( ).

If a database driver supports execution plan visualization, you can see the execution plan of the current query (under cursor) by pressing Ctrl+Shift+E or clicking Explain execution plan on the context menu or in the main toolbar: The execution plan command generates a tree of query execution as one of the result tabs and is convenient in estimating if the query/script is quick/optimal enough: You can open SQL editor preferences by pressing Alt+Enter. You can also use anonymous parameters (?), but you will need to enable them in SQL editor preferences: When you execute a query which contains dynamic parameters, DBeaver displays a dialog box in which you can fill the parameter values: You can use dynamic parameters in your SQL queries. If you execute a huge script with a large number of queries, it might cause unexpected problems. Each script query is executed in a separate thread (that is, all queries are executed simultaneously).NOTE: Be careful with this feature. The executes all queries in the script, but opens multiple result tabs. To execute a script opening each query results in a separate tab, press Ctrl+Alt+Shift+X or click Execute -> Execute Statements In Separate Tabs on the context menu or SQL Editor -> Execute Statements In Separate Tabs on the main menu or in the main toolbar. You can configure the script execution behavior in the SQL editor preferences (Right-click the script and click Preferences on the context menu). DBeaver parses queries one by one using a statement delimiter (“ ” by default) and executes them consecutively.

This executes all queries in the current editor (or selected queries) as a script. To execute the whole script, press Alt+X or click Execute -> Execute SQL Script on the context menu or SQL Editor -> Execute SQL Script on the main menu or in the main toolbar. This executes the SQL query under cursor or selected text and creates a new results tab. The same can be done using the main toolbar or the main menu: SQL Editor -> Execute SQL in new tab. To execute a query under cursor in a separate tab, press CTRL+\ or right-click the query and click Execute -> Execute SQL in new tab on the context menu. This executes the SQL query under cursor or selected text and fills the results pane with the query results. You can do the same using the main toolbar or main menu: SQL Editor -> Execute SQL Statement. To execute a query under cursor or selected text, press Ctrl+Enter or right-click the query and click Execute -> Execute SQL Statement on the context menu. Shortcut key combinations (see details further in this article) You can execute one query, a highlighted portion of a script, or a whole script.
