
性能优化
文章平均质量分 78
chengangcsdn
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mysql 性能优化之exists 写法不一样,性能提升400倍
业务需求查询订单中包含商品《高性能 mysql》的单据总量 上代码 select count(1) from saleorder a where a.tid = 180571 and exists(select 1 from saleorderdetail e1 where a.tid = e1.tid and a.billid = e1.billid and e1.goodsid in (1061) 执行时间为 16s mysql...原创 2021-01-06 14:13:41 · 4162 阅读 · 0 评论 -
mysql min函数优化
mysql min函数优化 select min(id) from table where noindexfield = 'abc' 当where条件未有索引,求的最小字段又是主键的时候,可采用 select id from table wherenoindexfield = 'abc' limit 1 优化方案出自高性能mysql ...原创 2020-08-12 20:43:01 · 428 阅读 · 0 评论