-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add explain support for SELECT
queries
#462
base: main
Are you sure you want to change the base?
Conversation
SELECT
queries
ExamplesHere are some example SQLiteIn the case of SQLite it will be quire rare that it is required to understand what is causing performance issues, but if provides a very detailed format on what it is exactly doing. So when it really matters it can be identified exactly where it is going wrong. It does not provide time measurements, but operations should be consistent in their execution times for each platform. SQLite byte codehttps://www.sqlite.org/opcode.html#codes
PostgresThe Postgres explain results show roughly what is being done and what entities are involved. Additionally it includes the time measurements for each The results from Postgres are luckily much more straight forward to be understood what is going on then the SQLite results. Allowing people to actually analyze their productive queries. There are free tools that can be used to render the Postgres classDiagram
%% If you see this line, there is no Mermaid extension installed.
%% For example, use https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid
namespace plan {
class `0`["Subquery Scan (0.004 ms)"] {
+ to_jsonb(ROW(authors.id, authors.name, authors.books))
}
class `1`["Index Scan (0.009000000000000001 ms)
complex_associations_authors"] {
+ authors_1.id
+ authors_1.name
+ (SubPlan 1)
}
class `2`["Aggregate (0.008 ms)"] {
+ COALESCE(jsonb_agg(to_jsonb(ROW(books.id, books.title))), '[]'::jsonb)
}
class `3`["Seq Scan (0.003 ms)
complex_associations_books"] {
+ books.id
+ books.title
+ books.author_id
}
}
`0` <-- `1`
`1` <-- `2`
`2` <-- `3`
SAP HANAThe most feature rich of the |
It is best practice when using HANA to use execution plan visualization files to identify the root cause of slow performing queries. This change targets to add native support for generating and downloading the plan visualization files directly from the HANA service.
As all public facing documentation only instructs on how to use execution plan visualizations with HANA Studio (deprecated for HANA Cloud) and Hana Runtime Tools (Only available in development environments). It is difficult to understand how to get access to the execution plan visualization files and their contents. Therefor providing a direct API in the HANA Service will allow us to direct our users to a clear path to get a better insight into their application performance.
The ability to open the generated files is available in the Visual Studio Code plugin SAP HANA SQL Analyzer.