Show Kusto query plan like EXPLAIN
Asked Answered
C

1

6

I find myself using the Kusto query language (KQL) via Azure Log Analytics, and I'm struggling to find a way to get any sort of detailed execution report or query plan.

In PostgreSQL I'd use EXPLAIN to produce a report on how the DBMS intends to execute the query, or EXPLAIN ANALYZE for a report on how a query actually got executed. Is there anything akin to that in KQL?

Searches for "kql query plan", "kusto explain query" etc have been largely fruitless, but this probably just means I don't know the right terms.

Clairclairaudience answered 15/3, 2022 at 2:29 Comment(4)
Exists in KQL and available for ADX (Azure Data Explorer), but not for Log Analytics - .show queryplan <| print 'Hello world'. What is the performance issue you are struggling with?Loafer
@DavidדודוMarkovitz It isn't a single concrete issue - it's more a case of "I want to know if this clause is pushed down through this view or not", etc. Visibility when optimising queries. I'm not used to working blind like this! I have tried linking Log Analytics to ADX before - I might see if .show works for ADX foreign data sources supplied by log workspaces.Clairclairaudience
I hear you :-) In any case, If by "linking" you mean query Log Analytics from ADX web UI / Client tool - it won't work. The limitation is in the Log Analytics serviceLoafer
@DavidדודוMarkovitz OK. Thanks, that's useful to know to save some time. LA has a lot of such "fun" limitations, part of why I'm migrating off it. Your advice is appreciated thankyou.Clairclairaudience
E
2
  • Supporting the suggestion provided by David דודו Markovitz and posting that as an answer to help the other community members who are having the related discussions.
  • Yes I do agree that Log analytics has many limitations and we can't link or query log analytics from ADX web UI.
  • Here are the few documents related to Log Analytics and it's limitations.
Epos answered 25/3, 2022 at 5:46 Comment(1)
Actually it is possible to query data in Azure Monitor (Log Analytics & Application Insights) using ADX web UI, however, doing so does not remove the limitations mentioned, including the lack of support for .show queryplan learn.microsoft.com/en-us/azure/data-explorer/…Loafer

© 2022 - 2024 — McMap. All rights reserved.