Skip to content

distsql: EXPLAIN(distsql) does not show subqueries #32645

@justinj

Description

@justinj

It would be helpful for debugging if EXPLAIN (DISTSQL) showed the plans for subqueries. As of today, it doesn't:

root@127.0.0.1:64155/defaultdb> explain (distsql) select (select * from x);
  automatic |                                                                                                                                                                url
+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    false   | https://cockroachdb.github.io/distsqlplan/decode.html#eJyMjzFLBDEUhHt_xTLVnQTMtSmVEw7Uk1VsJMWSDOfimix5CRwc-99lk0IsBMuZee978y4I0fNp-KLAvGMHqzCn6CgS02q1gYM_w2iFMcwlr7ZVcDER5oI85okweBumQrnRUPDMwzhVou5uu43u3EcJn7KFQs_gmUy3edk_7O9er-_74-N5C7soxJJ_8JKHE2H0ov5foafMMQh_VfibbBXoT2xvSizJ8TlFV880eax71fCU3NJdE4fQosUuV98BAAD__1e-aic=
(1 row)

image

Jira issue: CRDB-4724

Epic CRDB-55590

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-executionRelating to SQL execution.A-sql-explainIssues related to EXPLAIN and EXPLAIN ANALYZE improvementsA-sql-uiWhy is my query slow?C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries Team

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions