|
原帖由 sqysl 于 2008-7-22 20:03 发表 ![]()
既然上面说的普通索引和降序索引的物理存储没什么差别,我不认为分别走这两个索引的SESSION在访问这两个索引基于的表时,方向会有所不同。因为降序索引只是控制索引的键值按降序排列,既然没大小之分,还排列什么啊。两个索引,访问表的方向应该一样的。
我倒是觉得,用你说的两个暗示(HINTS)控制同一个索引按照不同的方向访问表的方法可行,会按照不同的方向来访问表。
I think you're right. The test should be like this instead: Create a table with 2 columns, ID and X. ID is strictly sequential 1 to e.g. 1000000. But X is random with some 100's scattered around. Create a regular index on ID and a descending one on ID. Then run 2 SQLs using the 2 different indexes.
Yong Huang |
|