Viewing 15 posts - 47,371 through 47,385 (of 59,064 total)
Heh... I see now... first, of course the rowcounts will be/are identical. And, of course your testing shows that WHERE IN will be much faster... you changed the problem...
November 5, 2008 at 7:23 pm
Do your tests all come back with the same rowcounts? Remember... it's random data and SomeInt has different counts for different values.
And, no... I didn't get any Index Seeks......
November 5, 2008 at 7:13 pm
Heh... I believe I have it... ROUND just shouldn't be used for display purposes... in Books Online, they say...
This example shows two expressions illustrating that with the ROUND function the...
November 5, 2008 at 6:49 pm
I get the correct answers by copying and pasting the code directly from the original post in SQL Server 2005...
November 5, 2008 at 6:34 pm
Heh... sure... you've done something wrong in the code. 😉
There is no way possible to figure out what's wrong from here with what you posted. Discounting all of the...
November 5, 2008 at 6:23 pm
krayknot (11/4/2008)
It only depends on the number of rows you have in the dB and the number of resultant rows after applying the condition
Absolutely not true. Take a look...
November 5, 2008 at 6:08 pm
Thanks for the feedback, Jorge. Let us know if there's anything else we can do to help.
November 5, 2008 at 6:06 pm
Heh... good luck.
November 5, 2008 at 6:05 pm
aevans1981 (11/5/2008)
I have commented out the swap section as i am using this to calculate the time taken to turn around orders from when...
November 5, 2008 at 6:01 pm
that's good news, Sam. Thank you very much for the feedback. Very happy I could help.
November 5, 2008 at 5:42 pm
I'd be tempted to use the one that uses the fewest resources... but lemme ask... are you returning any output from the procs to the screen?
November 5, 2008 at 5:37 pm
SQLBill (11/4/2008)
Quote:
where I can get good SQL exercise to practise sql queries and pl sql
Bolding is mine...
November 4, 2008 at 8:35 pm
Heh... or maybe "Stormtrooper Clones'R'Us" 😛
November 4, 2008 at 8:25 pm
My second swag would be that, as you suggest, both will cause some sort of index scan.... but because the WHERE NOT IN has only 42.857% as many items to...
November 4, 2008 at 8:22 pm
Viewing 15 posts - 47,371 through 47,385 (of 59,064 total)