
数据库
还不睡呀你。
这个作者很懒,什么都没留下…
展开
-
MySQL优化:利用索引
文章目录0.什么是索引1. MySQL是如何利用索引进行优化2. 优化主键,外键2.1 主键2.2 外键3. 单列索引和多列索引3.1 单列索引(Column Indexes)3.2 多列索引(Multiple-Cloumns Indexes)3.3 如何知道本次查询使用了哪些索引?4. InnoDB索引分析集合(Index Statistics Collection)4.1 前置知识4.2 av...原创 2019-12-01 18:41:35 · 132 阅读 · 0 评论 -
记一次SQL优化
INDEX:The most important preconditions for using indexes for GROUP BY are that all GROUP BY columns reference attributes from the same index, and that the index stores its keys in order 写了这么一条SQL EXP...原创 2019-11-25 10:42:19 · 203 阅读 · 0 评论 -
redis开发与运维读书笔记:第二章
2.1 预备 2.1.1 全局命令 keys *:查询所有的key,遍历所有的key,时间复杂度为O(n)。当数据量很大时,会非常慢,线上不建议使用; dbsize:返回所拥有的key的数量。redis内部有一个记录当前key数量的值,因此时间复杂度为O(1); exists:检查key是否存在; del:删除指定的key,可批量操作; expire:设置过期时间; ttl:返回key的剩余存货...原创 2019-09-25 23:37:39 · 171 阅读 · 0 评论