这些技术的例子有很多, 例如storing tables pre-joined,the addition of derived columns, and aggregate values。 Oracle提供了许多方法存储aggregates and pre-joined数据通过clustering and materialized view功能。这些特性应该在一个表的简单设计中采用。
Appending Columns to an Index or Using Index-Organized Tables
Using a Different Index Type
Finding the Cost of an Index
Serializing within Indexes
Ordering Columns in an Index
Appending Columns to an Index or Using Index-Organized Tables
从执行计划中, 提高查询速度的一个最简单的方法就是减少表的访问 (减少逻辑I/O), 这个可能通过给查询中的column加上索引。 这些columns是在select 对象column, 以及任何需要join和排序的columns. 这个方案,对那些在线及时反映的系统来说特别有用, 因为减少了 I/O的时间。 这个方案, 应该在系统有适当数据, 第一次测试时采用。
4. Partitioned Indexes
Partitioning a global index allows partition pruning to take place within an index access, which results in reduced I/Os. By definition of good range or list partitioning, fast index scans of the correct index partitions can result in very fast query times.
5. Reverse Key Indexes
这个索引的设计是为了降低不断插入的应用中的索引污点。 对于插入的性能, 这种索引是很卓越的。但是, 它不能用于index range scans。
Serializing within Indexes
Use of sequences, or timestamps, to generate key values that are indexed themselves can lead to database hotspot problems, which affect response time and throughput. 这是由于,线形增长的key能导致一个right-growing index。为了避免这个问题, try to generate keys that insert over the full range of the index. This results in a well-balanced index that is more scalable and space efficient. You can achieve this by using a reverse key index or using a cycling sequence to prefix and sequence values.
通过clustering 和排序, 减少I/O。 在大范围的扫描时, I/Os can usually be reduced by ordering the columns in the least selective order, or in a manner that sorts the data in the way it should be retrieved.详情参考:http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/data_acc.htm#g27061
好的Cursor 使用和管理SQL的执行有很多步骤, 包括语义分析, 安全检查,生成执行计划以及加载共享的结构到shared pool。 其中,解析有硬解析和软解析。 硬解析: SQL在首次提交的时候, 在shared pool中不能被匹配。 Hard parses are the most resource-intensive and unscalable, because they perform all the operations involved in a parse.