|
Posted by mcleana on 09/19/07 02:21
I have a view that contains a complex query. A few of the columns
call a function that returns a specific output. I also use a function
to do a join as well.
For example:
SELECT l.ID, dbo.getStatus(l.ID) AS statusID
FROM tableName A
LEFT OUTER JOIN dbo.Status_LKP s ON dbo.getStatus(l.Leg_ID) =
s.statusID
For 800 records, this query takes about 9 seconds. I realize that for
each record, the function is executed on a per row basis, so I am
looking for alternatives.
Does anyone know of other ways to accomplish something of the same?
Basically I would like to include UDFs in a query and use those UDFs
in the where and join clauses.
Thanks
Navigation:
[Reply to this message]
|