![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, We have some applications that put together dynamic queries. One thing I noticed is that all of the queries put an UPPER function at the end of it, assuming that the value passed will be alphanumeric. Although something like UPPER('123') makes no sense, it does it anyways. Is Oracle smart enough to know this and not execute the function call? I ran a simple query and the plan was exactly the same...... |
#3
| |||
| |||
|
|
The Magnet wrote: Hi, We have some applications that put together dynamic queries. *One thing I noticed is that all of the queries put an UPPER function at the end of it, assuming that the value passed will be alphanumeric. Although something like UPPER('123') makes no sense, it does it anyways. Is Oracle smart enough to know this and not execute the function call? *I ran a simple query and the plan was exactly the same...... How would not executing this function, modify the plan? |
#4
| |||
| |||
|
|
On Sep 10, 1:24 pm, "Gerard H. Pille"<g... (AT) skynet (DOT) be> wrote: The Magnet wrote: Hi, We have some applications that put together dynamic queries. One thing I noticed is that all of the queries put an UPPER function at the end of it, assuming that the value passed will be alphanumeric. Although something like UPPER('123') makes no sense, it does it anyways. Is Oracle smart enough to know this and not execute the function call? I ran a simple query and the plan was exactly the same...... How would not executing this function, modify the plan? Would it not speed it up, as it would not have to do the function call convert whatever to upper case? |
#5
| |||||||||
| |||||||||
|
|
On Sep 10, 1:24*pm, "Gerard H. Pille" <g... (AT) skynet (DOT) be> wrote: The Magnet wrote: Hi, We have some applications that put together dynamic queries. *One thing I noticed is that all of the queries put an UPPER function at the end of it, assuming that the value passed will be alphanumeric. Although something like UPPER('123') makes no sense, it does it anyways. Is Oracle smart enough to know this and not execute the function call? *I ran a simple query and the plan was exactly the same...... How would not executing this function, modify the plan? Would it not speed it up, as it would not have to do the function call convert whatever to upper case? |
|
Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | |
|
0 | SELECT STATEMENT | | 55 | 1650 | 1376 (1)| 00:00:17 | * 1 | TABLE ACCESS FULL| FUNCTEST | 55 | 1650 | 1376 (1)| 00:00:17 | |
|
Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | |
|
0 | SELECT STATEMENT | | 55 | 1650 | 1376 (1)| 00:00:17 | * 1 | TABLE ACCESS FULL| FUNCTEST | 55 | 1650 | 1376 (1)| 00:00:17 | |
|
Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | |
|
0 | SELECT STATEMENT | | 1 | 30 4 (0)| 00:00:01 | 1 | TABLE ACCESS BY INDEX ROWID| FUNCTEST | 1 | 30 4 (0)| 00:00:01 | * 2 | INDEX RANGE SCAN | FUNCTEST_IDX | 1 | 3 (0)| 00:00:01 | -------------------------------------------------------------------------------------------- |
|
Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | |
|
0 | SELECT STATEMENT | | 1 | 30 4 (0)| 00:00:01 | 1 | TABLE ACCESS BY INDEX ROWID| FUNCTEST | 1 | 30 4 (0)| 00:00:01 | * 2 | INDEX RANGE SCAN | FUNCTEST_IDX | 1 | 3 (0)| 00:00:01 | -------------------------------------------------------------------------------------------- |
![]() |
| Thread Tools | |
| Display Modes | |
| |