Viewing 15 posts - 53,491 through 53,505 (of 59,072 total)
Want a great answer that's actually been tested to work... quickly? Then read this, please...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 4:16 pm
What were the "tweaks"?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 4:13 pm
P.S.
Technically speaking, the LEN() example does, in fact, come up with the WRONG answer if you are looking for precisely 3 digits...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 3:04 pm
Heh... no need :blush: ... dunno what I was thinking about, but I was wrong... the LIKE will use and Index Seek... the LEN will not... here's the code...
DROP TABLE...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 2:53 pm
Sure... saw the same thing... but I wonder if they could put a hardcoded "clue" in the Local Google Search to include "SQLSERVERCENTRAL.COM" or something like that...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 2:31 pm
P1naga...
Just for grins and because of the Left Outer Join to t1, try changing your from clause from this...
FROM
dbo.S_PRILSTITEM T1
INNER JOIN dbo.SPRILST T2 ON T1.PRI_D = T2.ROWD
LEFT OUTER...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 2:24 pm
For the most part, I agree... especially if you check out the I/O and all.
I was just reminiscing about when I first got to my "new" job 4 years ago......
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 2:21 pm
Perfect... thanks for the feedback. And nice job, David!
Having 16 hours off is a rarity in this business 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 2:14 pm
Actually, both will do an index scan, I believe...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 2:12 pm
Yeah, you could... but who cares? So long as the code executes correctly, you may not need to see it.
Under {Tools}{Options}, click on the [Results] tab and see what...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 2:03 pm
The LIKE will be just a tiny bit faster in this case because it returns only the rows that have precisely 3 digits... the LEN()<9 will return things that have...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 1:56 pm
Heh... on the other side of the coin, how do you know it's not broke unless you try to fix it. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 1:46 pm
You mean like doing the SELECT/INTO from a "derived" table with a "Top 100 Percent"... dunno... haven't tried that, but I will 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 1:44 pm
How are you viewing the code? If it's in Query Analyzer, it may just be a view setting under Tools Options.
You can concatenate about 256 8k variables for an...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 1:35 pm
I do wish they'd go back to a forum specific search...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2007 at 1:25 pm
Viewing 15 posts - 53,491 through 53,505 (of 59,072 total)