Udf Oddities

I have been experiencing some wierd udf behaviour.
I have a udf that takes 7.5 mins to run.  The sql inside the udf runs in < 1s.
Run the query under index tuning wizard and it suggests a very odd index.
Adding the index gets the time for both down to < 1s.

I have a second udf that is not as condusive to the index tuning wizard.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s