Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1520879
  • 博文数量: 191
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4053
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-30 13:00
个人简介

About me:Oracle ACE pro,optimistic,passionate and harmonious. Focus on ORACLE,MySQL and other database programming,peformance tuning,db design, j2ee,Linux/AIX,Architecture tech,etc

文章分类

全部博文(191)

文章存档

2026年(2)

2025年(17)

2024年(27)

2023年(28)

2022年(43)

2020年(62)

2014年(3)

2013年(9)

发布时间:2025-04-06 21:14:51

1.排序键,排序要消除,才能limit裁剪,如果排序键在访问条件里更好,索引支持desc访问,如果前导列是等值,不用建desc索引
如果order by里没有前导列,要消除排序,排序列必须紧跟在等值访问条件索引后面,或者作为前导列,支持desc扫描,不用建desc索引
如果order by里有前导列,要消除排序,按order by顺序建组合索引即可,但是如果前导列非等值,则后面列如果desc,只能建desc索引


2.等值访问条件最好为前导列,就算选择性不好,也可以减少索引访问的行
3.遵循leftmost prefix规则,不能index访问的条件放到组合索引最后,可以起到index filter减少回表的作用
......【阅读全文】

阅读(87) | 评论(0) | 转发(0)

发布时间:2025-03-17 08:57:19

rows examined实际上是server层检查的行数,没有统计storage engine层内部处理的行数。这样很多看似是有问题的,就很好理解了,
但是,很多人把rows examined当成SQL性能的一种重要指标,认为这个是SQL扫描的行数,这就有问题了,实际上rows examined有时候
并不能准确反应storage engines扫描的行数。
......【阅读全文】

阅读(226) | 评论(0) | 转发(0)

发布时间:2025-03-16 18:26:51

在MySQL里,如果order by + limit,where或join条件还有可选索引,有可能走错索引,默认的是偏向于走order by 列索引。......【阅读全文】

阅读(143) | 评论(0) | 转发(0)

发布时间:2025-02-18 22:03:41

MySQL的RR模式下,快照读按照第一次select创建的readview读取快照数据,这是表级的,整个表所有行的快照都是在这个时间点。
快照读又叫一致性读(consistent read),unlock read,不加锁(元数据锁还是有的,行锁没有,就是普通SELECT)。
DML包括FOR UPDATE,FOR SHARED是当前读,会读取最新快照的数据,这类似幻读了。
普通SELECT在RR隔离级别下都是可重复读,快照读,除非混合了UPDATE,那么之后的SELECT会读取到本事务修改的数据,像普通的FOR UPDATE,FOR SHARE,
他们会读取到最新提交的数据,但是不影响后续的普通SELECT还是快照读,还是看不到新提交的数据。
......【阅读全文】

阅读(3505) | 评论(0) | 转发(1)

发布时间:2024-12-01 10:33:08

oracle,mysql,pg杀会话区别和注意点......【阅读全文】

阅读(216) | 评论(0) | 转发(0)
给主人留下些什么吧!~~

吻的感觉适2025-07-18 23:11

https://txc.qq.com/products/762795/blog/2019636
https://txc.qq.com/products/762801/blog/2019637
https://txc.qq.com/products/762763/blog/2019638
https://txc.qq.com/products/762772/blog/2019639
https://txc.qq.com/products/762790/blog/2019641
https://txc.qq.com/products/762758/blog/2019640
https://txc.qq.com/products/762786/blog/2019642
https://txc.qq.com/products/762782/blog/2019643
https://txc.qq.com/products/762757/blog/2019644
https://txc.qq.com/products/762805/blog/2019645
https://txc.qq.com/products/762785/blog/2019647
https://txc.qq.com/products/762815/blog/2019646
https://txc.qq.com/products/762787/blog/2019648
https://txc.qq.com/products/762799/blog/2019649
https://txc.qq.com/products/762775/blog/2019650
https://txc.qq.com/products/762759/blog/2019651
https://txc.qq.com/products/762770/blog/2019652
https://txc.qq.com/products/762855/blog/2019654

回复  |  举报

zhmw2020-05-27 16:10

tomcoding:Oracle DUL源代码,Logminer源代码,到我的博客看看

好的

回复  |  举报

zhmw2020-05-27 16:10

tomcoding:Oracle DUL源代码,Logminer源代码,到我的博客看看

好的

回复  |  举报

tomcoding2018-07-26 14:35

Oracle DUL源代码,Logminer源代码,到我的博客看看

回复  |  举报

电影vs程序员2013-08-22 18:16

博主,求加好友

回复  |  举报
留言热议
请登录后留言。

登录 注册