Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Analyze SQL query in DBeaver

I would like to get some info about a running query to analyze it. In PgAdmin 3 I could at least use 'Explain Query', while in DBeaver, after clicking 'Explain Execution Plan', nothing happens.

How to obtain any information about query in DBeaver?

@Edit

Sorry if this question seems too broad. I don't expect explanation of how to analyze the query, I just would like to know if it is possible to open an analyzer in DBeaver and how to do it.

like image 385
Michu93 Avatar asked Nov 16 '25 03:11

Michu93


2 Answers

The shortcut does not work for me. Use a mouse-click instead:

enter image description here

Example with

SELECT 1;

enter image description here

Or use the EXPLAIN command:

EXPLAIN SELECT 1;

enter image description here

A longer query could look like this, see https://dbeaver.com/docs/wiki/Query-Execution-Plan/ as said in the other answer as well:

Simple plan view

enter image description here

Advanced plan view

In DBeaver Lite, Enterprise, and Ultimate editions you can use an advanced (graph) visualization of the execution plan. This visualization shows the most expensive (cost-based) plan nodes. You can hide all irrelevant nodes (see node details), use horizontal or vertical plan layouts, export it to an image or save it as JSON to send to a colleague.

enter image description here

like image 54
questionto42standswithUkraine Avatar answered Nov 18 '25 16:11

questionto42standswithUkraine


Click on a query and press Ctrl+Shift+E

https://dbeaver.com/docs/wiki/Query-Execution-Plan/

like image 42
Nastia Avatar answered Nov 18 '25 18:11

Nastia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!