Function Based Index
Function Based Index
###########################################################################################
SYS>>set time on
17:21:13 SYS>>set timing on
17:21:15 SYS>>conn steve/steve
Connected.
17:21:20 STEVE>>update employee set ename='WILLS'
where empno=(select max(empno) from employee);
1 row updated.
Elapsed: 00:00:34.92
17:23:01 STEVE>>commit;
Commit complete.
Index created.
Elapsed: 00:05:49.63
System altered.
System altered.
###################################
# Elapsed: 00:01:00.18 #
###################################
Execution Plan
----------------------------------------------------------
Plan hash value: 2119105728
------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 6241 | 530K| 155K (1)| 00:31:01 |
|* 1 | TABLE ACCESS FULL| EMPLOYEE | 6241 | 530K| 155K (1)| 00:31:01 |
------------------------------------------------------------------------------
1 - filter(LOWER("ENAME")='wills')
Note
-----
- dynamic sampling used for this statement (level=2)
Statistics
----------------------------------------------------------
514 recursive calls
0 db block gets
566393 consistent gets
566353 physical reads
0 redo size
863 bytes sent via SQL*Net to client
415 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
6 sorts (memory)
0 sorts (disk)
1 rows processed
Index dropped.
Index created.
Elapsed: 00:05:33.75
System altered.
System altered.
17:38:20 SYS>>conn steve/steve
Connected.
###################################
# Elapsed: 00:00:00.36 #
###################################
Execution Plan
----------------------------------------------------------
Plan hash value: 2852480947
-----------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 715K| 64M| 46240 (1)| 00:09:15 |
| 1 | TABLE ACCESS BY INDEX ROWID| EMPLOYEE | 715K| 64M| 46240 (1)| 00:09:15 |
|* 2 | INDEX RANGE SCAN | FUN_ENAME | 286K| | 14513 (1)| 00:02:55 |
-----------------------------------------------------------------------------------------
2 - access(LOWER("ENAME")='wills')
Note
-----
- dynamic sampling used for this statement (level=2)
Statistics
----------------------------------------------------------
778 recursive calls
0 db block gets
191 consistent gets
117 physical reads
0 redo size
863 bytes sent via SQL*Net to client
415 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
11 sorts (memory)
0 sorts (disk)
1 rows processed
OBSERVATION : TIME ELAPSED FOR SELECT STATEMENT
ON TABLE HAVING NORMAL INDEX AND
BITMAP INDEX.