SELECT id, customer_id AS customerId, sku_id AS skuIdFROM custom_goods_vendor_maintainingWHERE store_id = 900 AND valid = 1 AND id > 0 AND u_t < 1703667933563 AND custom_goods_vendor_maintaining.store_id = 900ORDER BY idLIMIT 200
图中有关PolarDB的 pc-wz90aa8d1s3736keu相关问题是什么?
以下为热心网友提供的参考意见
加 hint: /+ SET_VAR(optimizer_switch=”prefer_ordering_index=off,”) / 就能解决,可以加 outline 来固定执行计划,我给您个语句。set character_set_client = ‘utf8’;
call dbms_outln.add_optimizer_outline(“vendor_manager”, “/+ SET_VAR(optimizer_switch=’prefer_ordering_index=off,’) /”, “explain SELECT id, customer_id AS customerId, sku_id AS skuId FROM custom_goods_vendor_maintaining WHERE store_id = 900 AND valid = 1 AND id > 0 AND u_t < 1703667933563 AND custom_goods_vendor_maintaining.store_id = 900 ORDER BY id LIMIT 200");
set character_set_client = ‘latin1’;
call dbms_outln.add_optimizer_outline(“vendor_manager”, “/+ SET_VAR(optimizer_switch=’prefer_ordering_index=off,’) /”, “explain SELECT id, customer_id AS customerId, sku_id AS skuId FROM custom_goods_vendor_maintaining WHERE store_id = 900 AND valid = 1 AND id > 0 AND u_t < 1703667933563 AND custom_goods_vendor_maintaining.store_id = 900 ORDER BY id LIMIT 200"); 此回答整理自钉群“PolarDB 专家面对面 – 慢SQL索引选择优化器新特性”。
本文来自投稿,不代表新手站长_郑州云淘科技有限公司立场,如若转载,请注明出处:https://www.cnzhanzhang.com/20469.html