Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Databases General > Re: reduce time...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 3109 of 3295
Post > Topic >>

Re: reduce time for search query

by Najm <najm25@[EMAIL PROTECTED] > Feb 27, 2008 at 10:59 AM

On Feb 26, 7:41=A0am, paankh...@[EMAIL PROTECTED]
 wrote:
> =A0Hi,
>
> I have a task at hand to reduce the time taken for search query to
> execute. The query fetches records which will have to sorted by
> degrees away from the logged in user. I have a function which
> calculates the degrees, but using this in the search query slows the
> execution and takes about 10 secs to complete which is unacceptable.
>
> Please advice. Your help is much appreciated
>
> For more details plz see:
>
> http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=3D97021
>
> Thanks
> Isfaar

Hi Isfaar,
Would it be possible for you to post your query here along with udf
definition. When a scalar UDF is invoked for each row in a query, it
can degrade the performance i.e. for each row you incur UDF invocation
cost. An inline expression might be faster than UDF in this case.

Depending on your SQL Server version, you might have to adopt
different approach.  If you are on SQL Server 2005, then cross apply
operator in conjuction with inline table function will do the trick
for you. Inline table function behaves differently than scalar
function.

If you are on SQL Server 2000, a precisely written subquery might do
the trick.

HTH,

Najm
 




 6 Posts in Topic:
reduce time for search query
paankhate@[EMAIL PROTECTE  2008-02-26 04:41:24 
Re: reduce time for search query
Najm <najm25@[EMAIL PR  2008-02-27 10:59:09 
Re: reduce time for search query
"Plamen Ratchev"  2008-02-27 22:51:27 
Re: reduce time for search query
jan.afzal@[EMAIL PROTECTE  2008-03-05 02:18:20 
Re: reduce time for search query
"Plamen Ratchev"  2008-03-06 17:43:22 
Re: reduce time for search query
Erland Sommarskog <esq  2008-03-08 19:49:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 9:48:57 CST 2008.