|
本帖最后由 Yong Huang 于 2013-2-22 23:19 编辑
> 不需要遍历啊,比如中间结果是 2个ROWIDs,那么只要 ROWID SCAN T两次就可以了啊
You're absolutely right! I forgot that the interim result is actually a set of ROWID's. (If it was regular row data, then it would scan the table T multiple times.) And you're right: we can think of the interim result as the driver. Note that Oracle probably thinks that because the ROWID's are pre-sorted, table T only needs to be scanned once, therefore Execs=1 on line 1 for the 10g plan. But interestingly, although the nature of the acccess to table T remains the same, the 11g plan accounting assigns 5 to Execs instead of 1.
> 11G的所谓 VECTOR I/O到底是怎么回事?
If the 11g "table access by index rowid" in the new NLJ uses vector I/O, that will be very interesting. I just tested with my small data set. I still see db file sequential read event for table T (using the new 11g plan). Maybe I need to check the underlying OS system call with e.g. strace on Linux and see readv() calls, instead of relying on the Oracle wait event. |
|