High Performance MySQL, Third Edition
by Baron Schwartz, Peter Zaitsev, and Vadim Tkachenko
 
Is an Index the Best Solution?
An index isn’t always the right tool. At a high level, keep in mind that indexes are most effective when they help the storage engine find rows without adding more work than they avoid. For very small tables, it is often more effective to simply read all the rows in the table. For medium to large tables, indexes can be very effective. For enormous tables, the overhead of indexing, as well as the work required to actually use the indexes,can start to add up. In such cases you might need to choose a technique that identifies groups of rows that are interesting to the query, instead of individual rows. You can use partitioning for this purpose; see Chapter 7.
//分区
 
If you have lots of tables, it can also make sense to create a metadata table to store some characteristics of interest for your queries. For example, if you execute queries that perform aggregations over rows in a multitenant application whose data is partitioned into many tables, you can record which users of the system are actually stored in each table, thus letting you simply ignore tables that don’t have information about those users. These tactics are usually useful only at extremely large scales. In fact, this is a crude approximation of what Infobright does.
At the scale of terabytes, locating individual rows doesn’t make sense; indexes are replaced by per-block metadata.
//建立一个元数据信息表用来查询需要用到的某些特性  执行那些需要聚合多个应用分布在多个表的数据查询则需要记录“哪个用户的信息存储在哪个表中”的元数据  定义单条记录的意义不大,故经常会使用块级别元数据技术来替代索引

Indexes (also called “keys” in MySQL)的更多相关文章

  1. B-tree R-tree B+-tree indexes 索引顺序存取方法 ISAM MySQL实现拓展ISAM为MyISAM

    High Performance MySQL, Third Edition by Baron Schwartz, Peter Zaitsev, and Vadim Tkachenko http://d ...

  2. Percona-Toolkit工具包之pt-archiver

      Preface       There's a common case that we neet to archive amount of records in some tables to a ...

  3. MySQL Crash Course #13# Chapter 21. Creating and Manipulating Tables

    之前 manipulate 表里的数据,现在则是 manipulate 表本身. INDEX 创建多列构成的主键 自动增长的规定 查看上一次插入的自增 id 尽量用默认值替代 NULL 外键不可以跨引 ...

  4. Mysql 5.7 官方文档翻译

    始于 2017年4月1日-愚人节 1.1 MySQL 5.7 新功能 本章节介绍了MySQL 5.7 新版本中新增.废弃.删除的功能. 在1.5章节 Section 1.5, "Server ...

  5. MySQL create table语法详解

    前面在查建表时key和index的区别时,发现建表语句包含了太多信息,于是完整看看官方手册的这一小节. 该文章根据MySQL 5.7的手册作笔记,而MySQL 8.0该节地址如下: https://d ...

  6. 分布式监控系统Zabbix-3.0.3-完整安装记录(2)-添加mysql监控

    Zabbix3.0 Server以后就自带了MySQL插件来监控mysql数据库的模板,只需要配置好agent客户端,然后在web端给主机增加模板就行了. 以下是公司线上的zabbix3.0环境下添加 ...

  7. Mysql 5.7 使用SSL安全连接

    MySQL默认的数据通道是不加密的,在一些安全性要求特别高的场景下,我们需要配置MySQL端口为SSL,使得数据通道加密处理,避免敏感信息泄漏和被篡改.当然,启用MySQL SSL之后,由于每个数据包 ...

  8. MySQL入门手册

    本文内容摘自MySQL5.6官方文档,主要选取了在实践过程中所用到的部分文字解释,力求只摘录重点,快速学会使用MySQL,本文所贴代码地方就是我亲自练习过的代码,凡本文没有练习过的代码都没有贴在此处, ...

  9. mysql之show engine innodb status解读

    注:以下内容为根据<高性能mysql第三版>和<mysql技术内幕innodb存储引擎>的innodb status部分的个人理解,如果有错误,还望指正!!   innodb存 ...

随机推荐

  1. UTF8 & GBK之间的转换

    使用lua的时候,在lua中给字符串赋值的中文,但是在C中读出来的就是乱码,是因为在lua中使用的是UTF8编码,而在C(windows下面)中使用的是GBK编码,将UTF8转成GBK就可以了,下面的 ...

  2. iOS protocbuf安装使用

    protobuf文件地址:https://github.com/google/protobuf 1.问题/usr/local.bak/lib /usr/local.bak/man /usr/local ...

  3. 配置Django框架为生产环境的注意事项(DEBUG=False)

    问题描述: Django1.10版本中框架中settings.py配置文件 配置文件settings.py配置了下面两项: DEBUG= False ALLOWED_HOSTS = ['*'] #这样 ...

  4. NFS 配置文件

    NFS 配置文件是 /etc/exports,内容如下: [root@localhost ~]# cat /etc/exports /data 192.168.216.129/32(rw,sync,a ...

  5. Splash wait() 方法

    wait()方法用于控制页面的等待时间,如下,实现访问淘宝并等待2秒,随后返回淘宝页面的源代码: function main(splash) splash:go("https://www.t ...

  6. 自己搭建CDN服务器静态内容加速-LuManager CDN使用教程

    为什么要自己来搭建一个CDN服务器实现网站访问加速?一是免费CDN服务稳定性和加速效果都不怎么行:二是用国内的付费CDN服务价格贵得要死,一般的草根站长无法承受:三是最现实的问题国内的CDN要求域名B ...

  7. liunx trac 安装记录

    1,下载地址 http://trac.edgewall.org/   2.安装 apache,python, mysql  3,安装trac (我的是0.12)  tar -zxvf  你下载的安装包 ...

  8. LeetCode——Nim Game

    Description: You are playing the following Nim Game with your friend: There is a heap of stones on t ...

  9. 【分享】IT产业中的三大定理(三) —— 反摩尔定理 (Reverse Moore's Law)

    Google(谷歌)的 CEO 埃里克·施密特在一次采访中指出,如果你反过来看摩尔定理,一个 IT 公司如果今天和十八个月前卖掉同样多的.同样的产品,它的营业额就要降一半.IT 界把它称为反摩尔定理. ...

  10. Linux上VNC 启动和关闭常见问题

    0, 重设密码 [root@yqrh5u2 ~]# vncpasswd           Password:          Verify:        [root@yqrh5u2 ~]# 1, ...