开发者社区 > 数据库 > 关系型数据库 > 正文

PolarDB这个sql trace PLAN是NULL是什么原因呢?

* 7. row *
TYPE: SQL
SQL_ID: 5dd0natwyujq5
SCHEMA_NAME: echemi_db_v0_3
DIGEST_TEXT: SELECT sdt . produce_id , sdt . customer_id , sel . company_name AS company_name_m , sel . prefix_domain_name , sdt . products_id , sdt . products_url_name , SUBSTRING ( sdt . category_id , ?, ... ) AS category_id_lv1 , sdt . produce_cas_no AS cas_no , sdt . produce_name , sdt . produce_url_name , sdt . goods_picture_s , sdt . goods_picture_m AS goods_picture , sdt . goods_picture_b , sdt . complete_flag , sdt . hot_flag , sdt . main_flag , sdt . grade_name , sdt . content , sdt . package_name , sdt . n_price_type , sdt . n_price_trade_term_type , sdt . n_price_trade_term_text , sdt . n_price , sdt . n_price_unit , sdt . n_price_currency , sdt . n_price_currency_symbol , CASE WHEN CEILING ( IFNULL ( sdt . n_min_price , ? ) ) = ? THEN ? WHEN sdt . n_price_end_date < CURDATE ( ) THEN ? ELSE ? END AS n_pending_flag , sdt . activity_id , sdt . activity_type , sdt . a_price_trade_term_type , sdt . a_price_trade_term_text , sdt . a_price , sdt . a_price_unit , sdt . a_price_currency , sdt . a_price_currency_symbol FROM t_e_all_produce_v1 sdt INNER JOIN t_e_all_seller_v1 sel ON sdt . customer_id = sel . customer_id WHERE sdt . delflag = ? AND sel . delflag = ? AND sdt . customer_id = ? AND sdt . products_id = ? AND sdt . produce_id != ? AND sdt . complete_flag = ? ORDER BY sdt . produce_update_date DESC LIMIT ?
PLAN_ID: NULL
PLAN: NULL
PLAN_EXTRA: NULL
ERROR_CODE: NULL
REF_BY: ["SQL_TRACE"]
FIRST_LOAD_TIME: 2024-04-17 13:24:13
LAST_HIT_TIME: 2024-04-29 14:42:42
EXECUTIONS: 213841
SUM_WAIT_TIME: 47130387
MIN_WAIT_TIME: 156
MAX_WAIT_TIME: 12521
SUM_EXEC_TIME: 0
MIN_EXEC_TIME: 0
MAX_EXEC_TIME: 0
SUM_ROWS_SENT: 125249
MIN_ROWS_SENT: 0
MAX_ROWS_SENT: 6
SUM_ROWS_EXAMINED: 24990973
MIN_ROWS_EXAMINED: 0
MAX_ROWS_EXAMINED: 98182
SUM_ROWS_AFFECTED: 0
MIN_ROWS_AFFECTED: 0
MAX_ROWS_AFFECTED: 0
SUM_LOGICAL_READ: 0
MIN_LOGICAL_READ: 0
MAX_LOGICAL_READ: 0
SUM_PHY_SYNC_READ: 0
MIN_PHY_SYNC_READ: 0
MAX_PHY_SYNC_READ: 0
SUM_PHY_ASYNC_READ: 0
MIN_PHY_ASYNC_READ: 0
MAX_PHY_ASYNC_READ: 0
EXTRA: NULL PolarDB这个sql trace PLAN是NULL是什么原因呢?

展开
收起
嘟嘟嘟嘟嘟嘟 2024-05-09 08:42:39 58 0
2 条回答
写回答
取消 提交回答
  • 这里TYPE是SQL表示的是整个SQL统计的信息,同一个SQL_ID下会有各个PLAN。TYPE为PLAN的表示计划。此回答整理自钉群“PolarDB 专家面对面 - 慢SQL索引选择优化器新特性”

    2024-05-09 15:53:49
    赞同 展开评论 打赏
  • PolarDB SQL跟踪中的PLAN为NULL,是因为查询优化器没有生成或无法提供该SQL语句的执行计划。这可能是因为查询未执行、计划缓存缺失、未显式请求解释计划、统计信息过时、系统配置限制等原因造成的,请采纳

    2024-05-09 09:35:38
    赞同 3 展开评论 打赏

阿里云关系型数据库主要有以下几种:RDS MySQL版、RDS PostgreSQL 版、RDS SQL Server 版、PolarDB MySQL版、PolarDB PostgreSQL 版、PolarDB分布式版 。

相关产品

  • 云原生数据库 PolarDB
  • 相关电子书

    更多
    SQL Server 2017 立即下载
    GeoMesa on Spark SQL 立即下载
    原生SQL on Hadoop引擎- Apache HAWQ 2.x最新技术解密malili 立即下载