So @RaduBerinde, @andreimatei and myself have recently found ourselves in want of this feature, so much that we have started to implement part of it (see below), but this was done outside of our product because we don't know to extend the UI code ourselves.
The desired feature is a new page in the UI application called "Query Inspector" which should more or less look like this:
in the UI 3 sections organized vertically:
Both canvases would run the graph visualisation interface already prototyped by Radu on https://raduberinde.github.io/
Note: this feature is not about running the query and inspecting its results. This would be quite more complicated to achieve! and not as useful I think, because we already have plenty of tools / apps to run queries.
To give you an idea of how much we're suffering, consider that we currently achieve this by the following steps across at least 3 screens:
Remark by @petermattis: this could be a "hidden" page like we already hide "raft" and "ranges".
/debug pages are meant for quickly adding developer targeted debugging aids, which is exactly what you're after here.
Happy to contribute to the design of this project, @knz, @RaduBerinde, @andreimatei! Let me know if you guys want to set up a time to quickly chat about this, and see what we can do to make this less painful.
@RaduBerinde @andreimatei @knz I was thinking about picking this up—at least a draft implementation that tackles most of the UI work—in the next week or so, in between work on my starter project. Is this still needed/is that timeline okay?
Y E S — Ⓨ Ⓔ Ⓢ — Ꙅ Ǝ Y — ⒴ ⒠⒮
@knz Note that as of #13521, COCKROACH_DISTSQL_LOG_PLAN=1 also prints out a URL that encodes the plan. The URL is not pretty, but it's convenient.
BTW I was thinking of adding an EXPLAIN (DISTSQL) that prints out the plan JSON and this link.
It's neat but 1) I don't want to rely on a separate public web site for this (what about privacy / confidentiality) 2) it's a single point of failure 3) it doesn't work if you're not connected to the internet.
Ideally we'd use your html/json and bake it in our UI generator.
Sure, I was just mentioning it because it's easier in the interim.
If this Query Inspector screen would also display tracing information, I could die a happy man :)
For context, @benesch, we have some work in progress tracing work that makes it pretty easy to get (distributed) tracing information for a query. We can talk about it if you're interested.
@knz, are you still planning on/hoping for a logical query plan? The physical half of this is done!
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Sadly @jrbotros's work rotted a bit (it had stopped working, and wasn't linked to from anywhere) and was deleted. It'd be nice to have it back, but It seems EXPLAIN (DISTSQL) has somewhat relieved the pain for internal devs which motivated this.
Also, @dianasaur323, myself and others have started talking about it again as a user-facing feature (probably 2.2 timeframe), that you get to from a new "workload" screen which has a table of query fingerprints. Click a fingerprint, get a representative plan. (The notion of "representative plan" needs some refinement).
looking forward to this being implemented in the DistSQL or something else
This is done now, in the statements page.
Most helpful comment
@RaduBerinde @andreimatei @knz I was thinking about picking this up—at least a draft implementation that tackles most of the UI work—in the next week or so, in between work on my starter project. Is this still needed/is that timeline okay?