Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL Question
If I
remember correctly it would be executed once for every resulting
row.
if
you placed it in the where clause it would be diffierent.
<FONT
face=Tahoma size=2>-----Original Message-----From: Steve Haas
[mailto:steven.haas_at_snet.net] Sent: Friday, July 13, 2001 8:20
AMTo: Multiple recipients of list ORACLE-LSubject: SQL
Question
Good morning,
Env't: Oracle 8.1.5, HP-UX 11.0 (64
bit)
Given the following tables:
emp with 100 rows
dept with 10 rows
and this SQL:
select emp.ename,
initcap(dept.deptname)
from emp.dept
where emp.deptno = emp.deptno;
The questions -
How many times is the initcap(dept.deptname)
function actually "executed"?
Is it once for each emp row (100 times) or once
for each dept row (10 times) or some other value?
Another scenario -
Would it be faster to retrieve rows with a
bunch of similar functions (initcap, concatenations of columns and/or
literals, etc) or to have and maintain the data in columns with the data
formatted as such?
TIA gurus...
Steve HaasOpus Consultants,
LLC
Received on Fri Jul 13 2001 - 07:27:53 CDT
![]() |
![]() |