Do I need an index
Hi,
Oracle database 11.2 on Linux
I have a large table T1 with 10 columns, col1, col2, col3. ........col10
T1 primary key is (col1,col2,col3,col4). which has an index on (col1,col2,col3,col4).
Do I need another index on col3 for statements like.
select col5 from T1 where col3='xx';
The explain plan below shows I need an index on col3
1- Without col3 index
-----------
Plan hash value: 1119245414
----------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 145 | 10770 (1)| 00:02:10 |
|* 1 | TABLE ACCESS FULL| T1 | 1 | 145 | 10770 (1)| 00:02:10 |
----------------------------------------------------------------------------------------------
2- After adding the index
--------------------
Plan hash value: 3956034033
--------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |