|
最初由 wshlinux 发布
[B]不是说小表做全表扫描会比使用索引快吗
怎么COST显示索引还会更快..
如果是这样的话,要什么样子的小表在满足索引条件下不使用索引而直接全表扫描
各位大侠不吝赐教 [/B]
Again, it's up to Oracle's cost calculation to determine which path to take. If you really want to know how Oracle makes this decision, you need to turn on event 10053.
Generally, a full table scan is desired if the number of rows required by the query is approximately 20% or more of all rows in the table. Size of the table per se doesn't really matter, although usually the smaller the table, the higher percentage of rows retrieved.
Yong Huang |
|