Composite Indexes【每日一译】--20121210

本文介绍了数据库中的组合索引,一种可以提高SELECT语句执行效率的数据结构。组合索引可在表的多个列上创建,并且列的顺序对于索引的效果至关重要。通常情况下,最常用或最具选择性的列会被放在索引的开头。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

A composite index (also called a concatenated index) is an index that you create on
multiple columns in a table. Columns in a composite index can appear in any order

and need not be adjacent in the table.

一个组合索引(也叫做连接索引)它是你创建在一个表上的多个列。一个组合索引中的多个列

可以任何的顺序出现并且在表中不需要要相邻的。

Composite indexes can speed retrieval of data for SELECT statements in which the
WHERE clause references all or the leading portion of the columns in the composite
index. Therefore, the order of the columns used in the definition is important.

Generally, the most commonly accessed or most selective columns go first.

组合索引可以加快检索数据速度对于SELECT语句在WHERE语句里与相关的所有或者是

在组合索引中多列的开头部份。所以,所以多列的顺序在定义时候是重要的。

一般而言,最常见的访问或者最多选择率的列放在前面。

No more than 32 columns can form a regular composite index. For a bitmap index, the
maximum number columns is 30. A key value cannot exceed roughly half (minus
some overhead) the available data space in a data block

不超过32列可以构成一个常规组合索引。对于一个位图索引,最大的列值是30.一个主键值

不能超过大致(扣去一些消耗)在数据块中可用数据空间的一半。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值