|
事实胜于雄辩:
create table test as select t.*,owner as PRODUCTPACK_OCID, object_id as BUSISORTNO from all_objects t;
create index test_idx on test (PRODUCTPACK_OCID, BUSISORTNO);
select * from test where PRODUCTPACK_OCID in ('SYS','JSU') ORDER BY BUSISORTNO DESC;
Execution Plan
----------------------------------------------------------
Plan hash value: 324935210
----------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
----------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 7319 | 1029K| | 486 (1)| 00:00:01 |
| 1 | SORT ORDER BY | | 7319 | 1029K| 1472K| 486 (1)| 00:00:01 |
| 2 | INLIST ITERATOR | | | | | | |
| 3 | TABLE ACCESS BY INDEX ROWID BATCHED| TEST | 7319 | 1029K| | 248 (0)| 00:00:01 |
|* 4 | INDEX RANGE SCAN | TEST_IDX | 7319 | | | 22 (0)| 00:00:01 |
----------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
4 - access("PRODUCTPACK_OCID"='JSU' OR "PRODUCTPACK_OCID"='SYS')
|
|