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.
| Author |
Topic |
|
rammohan
Posting Yak Master
212 Posts |
Posted - 2009-12-17 : 00:35:57
|
| hi,i had two queries, i want to know which query is better acc to performance wise though these are simpel queries.one : select top 1 resultsid from results with(tablockx) where status = 1 order by resultsidtwo :select min(resultsid) from results with(tablockx) where status = 1 how can i know which query is better.how can i know performance diff b/w two objects which can be used for same requirement?One can never consent to creep,when one feels an impulse to soarRAMMOHAN |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-17 : 02:07:54
|
| Set the execution plan and seeIt should be better to use the second optionMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|