tidb 绑定执行计划

create global binding for select * from sbtest1 where c='cc'
using
select * from sbtest1 use index(idx_2) where c='cc';


explain analyze select * from sbtest1 use index(idx_2) where c='2';
explain analyze select * from sbtest1 where c='cc'

explain analyze select * from sbtest1
where c='68487932199-96439406143-93774651418-41631865787-96406072701-20604855487-25459966574-28203206787-41238978918-19503783441';

删除bindings
drop global binding for select * from `sbtest` . `sbtest1` where `c` = ?

show bindings;
show global BINDINGS

posted @ 2022-08-24 13:58  东哥加油!!!  阅读(122)  评论(0编辑  收藏  举报