Tidb_decode_plan('xxxxx') returns empty

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb_decode_plan(‘xxxxx’) 返回为空

| username: TiDBer_rdb3y58G

The plan_digest queried from information_schema.cluster_statements_summary returns empty when using tidb_decode_plan('xxxxx'). Why is this? Can the execution plan only be queried through the plan field?

| username: caiyfc | Original post link

You can try using plan_digest in cluster_slow_query to find the execution plan.

| username: Kongdom | Original post link

Refer to the documentation, you need to get the encoding from the slow query cluster_slow_query.