Viewing 15 posts - 2,311 through 2,325 (of 10,143 total)
DavidDroog (8/5/2015)
Here is a zipped up bak (SQL Server 2008 R2) file filed with sample data and the proc. It is 17 meg so too large to post here...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 5, 2015 at 6:11 am
s.chandrahasan (8/5/2015)
I am looking for like a function to insert data like below instead of creating insert statement in your query.
select Name,Value1,Value2,Value3 from ...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 5, 2015 at 6:09 am
ScottPletcher (8/3/2015)
ben.brugman (8/3/2015)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 4, 2015 at 1:48 am
coolchaitu (8/3/2015)
Yes sir, i am the junior dba
So escalate it to your boss. This isn't an issue for a junior. Whilst he's dealing with that, get yourself some decent indexing...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 3, 2015 at 10:26 am
coolchaitu (8/3/2015)
Sir, dev team is saying that dba should be doing it.
Are you the DBA, by any chance?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 3, 2015 at 10:05 am
coolchaitu (8/3/2015)
I am not developer sir. There is Dev team and those developers/programmers have written the code. Please help sir
Why are you unable to push this issue back to the...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 3, 2015 at 9:52 am
coolchaitu (8/3/2015)
The SPIDs are changing frequently and they are multi-threaded. Wait type...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 3, 2015 at 8:57 am
coolchaitu (7/24/2015)
Thanks a lot for replying. Actually, the stored proc calls another stored proc and hence there are 2 execution plans.Could you please advise on how to improve this proc.
The...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 3, 2015 at 7:39 am
How can you be certain that the extra time taken for the first run of this stored procedure is the time taken to compile and not the time taken to...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 3, 2015 at 4:11 am
That index doesn't contain SMSId. You could change an existing index for this query:
CREATE NONCLUSTERED INDEX [IX_tblSMS_Sent_SMSId] ON dbo.tblSMS_SentTest
([SMSId] ASC) INCLUDE (SentDate)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB =...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 25, 2015 at 4:37 am
The two plans are for different queries. I've looked at the second one because it causes an optimiser timeout - that is, it's too convoluted for SQL Server to guarantee...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 24, 2015 at 7:14 am
SELECT
p.Username,
COUNT(mr.RecipientId) AS [TotalMessages],
x.NewMessage
FROM [User].[User_Profile] p
JOIN [MailBox].[Message] m ON p.Id = m.SenderId
JOIN [MailBox].[MessageRecipient] mr ON m.Id = mr.MessageId
CROSS APPLY (
SELECT [NewMessage] = CASE
WHEN mr.ReadDate IS...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 24, 2015 at 6:38 am
Is Skynet Coming?
GilaMonster (7/23/2015)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Yup.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 24, 2015 at 6:34 am
GilaMonster (7/23/2015)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Massive well done - but how on Earth do you top that? If you choose to do a PhD, you won't have time for us... :crying:
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 24, 2015 at 6:30 am
DavidDroog (7/23/2015)
Surprised this thread was still going when logged in this morning. ChrisM - I didn't realise people were actually offering to optimise my query, but if that is...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 24, 2015 at 5:50 am
Viewing 15 posts - 2,311 through 2,325 (of 10,143 total)