Viewing 15 posts - 18,946 through 18,960 (of 59,098 total)
Here's one way that will help with both parameter sniffing and a way to get SQL Server to usually pick the correct execution plan.
CREATE PROCEDURE dbo.USP_1 @Par1 NVARCHAR(10)
...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 20, 2015 at 8:15 am
MotivateMan1394 (12/20/2015)
Thank you JasonAnd what about 'Parameter sniffing', some one say me about that ? what is it ?
Worse than parameter sniffing and much more importantly, the second method is...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 20, 2015 at 7:33 am
Eirikur Eiriksson (12/20/2015)
Piling on, while the string splitting method works fine when working with small number of values the performance degrades very quickly when the number of values increases.
It's uncharacteristic...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 20, 2015 at 7:29 am
Borrowing heavily from Jason's fine post and making a slight change to how the data is constructed so that people still using 2005 can easily play along if they need...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2015 at 9:44 am
Adi Cohn-120898 (12/8/2015)
--Jeff Moden
Change is inevitable... Change for the better is not.
December 19, 2015 at 8:25 am
Jason A. Long (12/17/2015)
Recursive CTEs aren't bad once you get your head wrapped around them... If you want to post some consumable test data, I'll attempt a solution.
See thee first...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 6:35 pm
Despite it's occasional problems (mostly caused by humans), I loved the old syntax... it was great for job security especially since we also used Oracle and it's exactly the opposite....
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 6:17 pm
vijaykumar587 (12/18/2015)
But If have lot of records, for example in my data-set I have 500 thousand records. The query is taking...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 6:13 pm
hlsc1983 (12/18/2015)
I want to set the default value of Commission column to 1000 for those records whose value in Job column is Manager....
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 4:53 pm
Ed Wagner (12/18/2015)
feersum_endjinn (12/18/2015)
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 4:49 pm
I'll throw my hat into the ring and say "It Depends".
While SQL Server can certainly handle a whole lot of databases, there may be logical or even strategic reasons to...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 4:41 pm
Consider this and the symptoms...
If the email job is currently running, will any of the data that you've selected come back as NULL? ANY concatenation of NULL will wipe...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 4:32 pm
ciskypete (12/18/2015)
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 4:23 pm
John Hanrahan (12/18/2015)
A business case for this might be inventory. In our case we had a clerk enter in an invalid unit of measure then she completed some transactions....
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 3:34 pm
ChrisM@Work (12/17/2015)
twin.devil (12/17/2015)
you can also...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 18, 2015 at 3:09 pm
Viewing 15 posts - 18,946 through 18,960 (of 59,098 total)