我之前只是知道如果走索引排序时,如果关键值相同,则按rowid来进行排序,我也经过试验证实了这一点。我一直以为全表扫描时排序如果关键值相同也是按rowid来进行排序,结果最近做实验发现并不是这样,简单实验如下:
ETL@RACTEST> create table ttt1 (a varchar2(2),b number);
Table created.
Elapsed: 00:00:00.04
ETL@RACTEST> insert into ttt1 values(a,1);
1 row created.
Elapsed: 00:00:00.00
ETL@RACTEST> insert into ttt1 values(,1);
1 row created.
Elapsed: 00:00:00.00
ETL@RACTEST> insert into ttt1 values(c,1);
1 row created.
Elapsed: 00:00:00.01
ETL@RACTEST> insert into ttt1 values(d,1);
1 row created.
Elapsed: 00:00:00.01
ETL@RACTEST> commit;
Commit complete.
Elapsed: 00:00:00.00
ETL@RACTEST> select * from ttt1;
A B
-- ----------
a