oracle oracle中的索引类型?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2460399/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 02:28:47  来源:igfitidea点击:

Types of Index in oracle?

oracleoracle10g

提问by P Sharma

What are the type of indexes in oracle? How to identify the index need to create?

oracle中的索引类型有哪些?如何识别需要创建的索引?

回答by dba.in.ua

Oracle Database provides several indexing schemes that provide complementary performance functionality. These are:

Oracle 数据库提供了多种索引方案,可提供互补的性能功能。这些是:

  • B-tree indexes: the default and the most common
  • B-tree cluster indexes: defined specifically for cluster
  • Hash cluster indexes: defined specifically for a hash cluster
  • Global and local indexes: relate to partitioned tables and indexes
  • Reverse key indexes: most useful for Oracle Real Application Clusters applications
  • Bitmap indexes: compact; work best for columns with a small set of values
  • Function-based indexes: contain the precomputed value of a function/expression Domain indexes: specific to an application or cartridge.
  • B 树索引:默认的和最常见的
  • B-tree 簇索引:专门为簇定义
  • 哈希簇索引:专门为哈希簇定义
  • 全局和本地索引:与分区表和索引相关
  • 反向键索引:对 Oracle Real Application Clusters 应用程序最有用
  • 位图索引:紧凑;最适合具有一小组值的列
  • 基于函数的索引:包含函数/表达式的预计算值 域索引:特定于应用程序或盒式磁带。

Source: http://docs.oracle.com/cd/B19306_01/server.102/b14231/indexes.htm

来源:http: //docs.oracle.com/cd/B19306_01/server.102/b14231/indexes.htm

回答by Jeffrey Kemp

There are a number of index types in Oracle, depending on what object you need to index:

Oracle 中有多种索引类型,具体取决于您需要索引的对象:

For heap tables, there are b-treeindexes and bitmapindexes.

对于堆表,有b 树索引和位图索引。

A b-tree index is suitable for most applications; bitmap indexes have their own advantages and disadvantages.

b-tree 索引适用于大多数应用程序;位图索引各有优缺点。

There are also specialised indexes for specific data types, using Oracle cartridges; e.g. Oracle Textindexes, spatialindexes, and 3rd party indexes.

也有针对特定数据类型的专用索引,使用 Oracle 卡盒;例如Oracle Text索引、空间索引和 3rd 方索引。

Furthermore, an index might be differentiated by other factors:

此外,一个指数可能会因其他因素而有所不同:

  • an index on a partitioned table might be global or local
  • an index might consist of one column, or multiple columns
  • an index might be on a normal column, or on an expression (aka "function-based" index)
  • 分区表上的索引可能是全局的或本地的
  • 索引可能包含一列或多列
  • 索引可能位于普通列或表达式(又名“基于函数”的索引)上

For more info, read the documentation.

有关更多信息,请阅读文档

An excellent place to find out more than you'll ever want to know about Oracle indexes is Richard Foote's blog.

Richard Foote 的博客是了解 Oracle 索引的更多信息的绝佳场所。