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 2000 Forums
 Transact-SQL (2000)
 Query Plan

Author  Topic 

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-03-30 : 01:31:11
Hi All,

I have 2 Queries both of them returning same result but the query cost for one query is comming 51.07 % and another is coming 49.02%

First Query

Select * From Loclib5 Where Code in (
Select Code From Loclib5 Group by Code Having Count(1) >1) -- Query Cost 49.02 %


Second Query

Select * From Loclib5 Inner Join (
Select Code From Loclib5 Group by Code Having Count(1) >1) As F
On F.Code = Loclib5.Code -- Query Cost 51.07


Can anyone tell me how Query Cost is calculated(Same Algorithm etc..) and what is the signifance of the same.. ???

Thanks..



If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-30 : 03:10:06
See if this helps
http://www.sql-server-performance.com/query_execution_plan_analysis.asp

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-03-30 : 04:40:46
Thanks i will check ..

If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.
Go to Top of Page
   

- Advertisement -