Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how to get faster results in query?

Author  Topic 

sqlhelp14
Yak Posting Veteran

55 Posts

Posted - 2008-02-21 : 10:23:42
Hello Sql genius,

I m getting results in 25seconds and i want faster then that. i saw execution plan of the query and it shows that in tablescan in inside 2nd query it takes cost:100% (estimated operator cost) so can anybody guide me what should i do?
i have to create index or any sql performance ?

pl. reply me.

thank you so much.

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-02-21 : 10:31:06
Add proper index to the table to avoid table scan.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2008-02-21 : 10:32:24
best if you can show us your code and your table DDL...plus tables sizes.

but in essence you may need to eliminate ( or restructure use of) a function or implement some indices to support your WHERE clause.
Go to Top of Page

sqlhelp14
Yak Posting Veteran

55 Posts

Posted - 2008-02-21 : 10:48:06
i modified my inner select query and now i m getting tablescan-58%..and RID lookup cost:37% and getting results in 15seconds..it better but is there anyway to get results in atleast 7-8seconds..

btw, can anyone tell me what's RID lookup?

thanks a lot!!!
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2008-02-21 : 10:51:46
Can you tell me how to get home from work quicker? Right now it takes me 35 minutes, I'd like to get that down to 25. Please help!!

That's a tough question for you to answer without more info, right?

Show us your table structure including all indexes and your SQL statement. Sample data and a description of what the SQL statement is doing helps as well.



- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-02-21 : 10:52:43
If you need best solution :
Post your queries...nobody can read your mind
Go to Top of Page
   

- Advertisement -