我什么时候应该使用Oracle的索引组织表?或者,我什么时候不应该? [英] When should I use Oracle's Index Organized Table? Or, when shouldn't I?

查看:142
本文介绍了我什么时候应该使用Oracle的索引组织表?或者,我什么时候不应该?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

索引组织表(IOT)是存储在索引结构中的表。而在堆中存储
的表是无组织的,IOT中的数据按主键存储和排序(数据是索引)。 IOT的行为就像常规表,并且使用相同的SQL来访问它们。

Index Organized Tables (IOTs) are tables stored in an index structure. Whereas a table stored in a heap is unorganized, data in an IOT is stored and sorted by primary key (the data is the index). IOTs behave just like "regular" tables, and you use the same SQL to access them.

正确的关系数据库中的每个表都应该有一个主键。 。如果我的数据库中的每个表都有一个主键,我应该总是使用索引组织表吗?

Every table in a proper relational database is supposed to have a primary key... If every table in my database has a primary key, should I always use an index organized table?

我猜测答案是

推荐答案

基本上,索引组织表不是组织表是一个没有表的索引。所以如果你有一个表的列包括主键和最多一个其他列,那么你有一个可能的候选INDEX ORGANIZED。

Basically an index-organized table is an index without a table. So if you have a table whose columns consist of the primary key and at most one other column then you have a possible candidate for INDEX ORGANIZED.

但是如果你发现自己在非主键列上需要额外的索引,那么你可能最好使用常规的堆表。因此,由于大多数表可能需要额外的索引,大多数表不适合IOT。

But if you find yourself contemplating the need for additional indexes on the non-primary key columns then you're probably better off with a regular heap table. So, as most tables probably need additional indexes most tables are not suitable for IOTs.

在实践中,索引组织表最有可能是引用数据,代码查找事务。应用程序表几乎总是只是堆组织。

In practice, index organized tables are most likely to be reference data, code look-up affairs. Application tables are almost always just heap organized.

这篇关于我什么时候应该使用Oracle的索引组织表?或者,我什么时候不应该?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆