How to get the query plan in json format in cdb ?

We are trying to build a worker, which checks if the query is indexed or not. In PostgreSQL, we have the ability to get the query plan in JSON format using EXPLAIN (FORMAT JSON, ANALYZE) + {QUERY}

Is there any same functionality, available in the cockroach DB? Can you please let me know if such support exists?

Hi! CockroachDB doesn’t support this now, but here is a tracking issue for adding this feature: sql: add support for a JSON explain plan output · Issue #60464 · cockroachdb/cockroach · GitHub Please follow there and comment if you have any details to add.