Viewing 15 posts - 43,186 through 43,200 (of 59,063 total)
Roy Ernest (6/26/2009)
GilaMonster (6/26/2009)
Grant Fritchey (6/26/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 8:17 pm
Florian Reischl (6/26/2009)
lmu92 (6/24/2009)
would someone with execution plan background mind to take a look at this post and verify if I'm on the right track or misguiding the OP?
The...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 7:57 pm
Heh... I almost forgot... you can get a tiny bit more speed out of it if you move the pre-aggregation from the derived table to a CTE like this...
[font="Courier New"];WITH
ctePreAgg AS
(--==== Pre-aggregate the data. This will obviously work much better with the correct index
SELECT Acct_Debtor, Occurance, MAX(LandLine_Contact_No) AS Max_LandLine_Contact_No
FROM dbo.Post_File082_Landline_No
GROUP BY Acct_Debtor, Occurance
)
SELECT preagg.Acct_Debtor,
MAX(CASE WHEN preagg.Occurance=1 THEN preagg.Max_LandLine_Contact_No ELSE NULL END) AS LandLineNumber1,
MAX(CASE WHEN preagg.Occurance=2 THEN preagg.Max_LandLine_Contact_No ELSE NULL END) AS LandLineNumber2,
MAX(CASE WHEN preagg.Occurance=3 THEN preagg.Max_LandLine_Contact_No ELSE NULL END) AS LandLineNumber3
FROM ctePreAgg AS preagg
GROUP BY preagg.Acct_Debtor[/font]
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 7:56 pm
Paul White (6/25/2009)
So PIVOT can be slightly more efficient - if...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 7:43 pm
lmu92 (6/22/2009)
SELECT
ACCT_DEBTOR,
MAX(Case WHEN OCCURRENCE=1 THEN LANDLINE_CONTACT_NO ELSE null END) AS LandLineNumber1,
MAX(Case WHEN OCCURRENCE=2 THEN LANDLINE_CONTACT_NO ELSE null END) AS LandLineNumber2,
MAX(Case WHEN OCCURRENCE=3 THEN LANDLINE_CONTACT_NO ELSE...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 7:34 pm
In that case, if the CPU spikes for more than an hundred milliseconds or so, I'd have to say something is wrong.
Can't help without a bit more information:
1. How...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 6:58 pm
Scott Coleman (6/26/2009)
You can use a self-join solution, although depending on your rowcounts and indexes this may...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 3:29 pm
Florian Reischl (6/26/2009)
Sure, it's a task on my list, too. 😉 But it's really neat that he provides a complete test setup.
I agree... it just like some of the good...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 3:25 pm
Florian Reischl (6/26/2009)
Jeff Moden (6/26/2009)
jaclynmcatanzaro (6/26/2009)
Good SQL Server articleWhich one?
Can't answer your question but the new article by Adam Machanic is really good in my opinion:
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 3:19 pm
Unless you're very careful, it becomes nothing more than an excuse for releasing bad or slow product with no documentation. Contrary to what many believe, it does take some...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 3:08 pm
DBCC CHECKIDENT
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 3:00 pm
jaclynmcatanzaro (6/26/2009)
Good SQL Server article
Which one?
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 2:53 pm
You can specify that the sort done during the rebuild will be done in TempDB which should make your life a whole lot easier when it comes to space used.
Of...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 2:49 pm
karthik_sql (6/24/2009)
Please try the below1. Put db to Simple recovery
Absolutely NOT! That will make a mess of the log file for purposes of backup.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 2:46 pm
tejas parikh (6/26/2009)
All I'm running is a simple count(*) below. The cpu usage goes to a 100%...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2009 at 2:44 pm
Viewing 15 posts - 43,186 through 43,200 (of 59,063 total)