Viewing 15 posts - 736 through 750 (of 7,597 total)
Yeah, Cost Threshold for Parallelism is way too low. That is likely causing the crazy spikes in response/CPU times.
July 6, 2022 at 7:27 pm
On the missing index views? They just don't say anything. I'm not talking about all the other DMVs. They're vital. 1 million percent so. But the missing index DMVs?...
July 6, 2022 at 7:26 pm
I wonder what Jonathan's parallelism settings are, and other SQL settings that might affect the run times. Some of those results are definitely out of place.
July 6, 2022 at 6:06 pm
Generally speaking, the missing index recommendations taken from the DMV tables are useless. That's because they are not, and cannot be, linked to a given query. So you just...
July 6, 2022 at 5:52 pm
For Question #1, Scott's method is the fastest. Don't take my word for it, though.
These are the results from my machine
***********************************************************************************************************************
===== Scott's Code) =====
DBCC...
July 6, 2022 at 2:08 am
I'm curious to see if anyone takes a shot at (2). Maybe it's TL;DR :smile:.
July 5, 2022 at 11:49 pm
;WITH cte_add_row_num AS (
SELECT *, ROW_NUMBER() OVER(PARTITION BY Itinerary ORDER BY CreationDate) AS row_num
FROM dbo.Test
)
SELECT T.*
FROM dbo.Test T
INNER JOIN...
July 5, 2022 at 11:48 pm
As I see it, it's not the ROW_NUMBER itself that causes inefficiency (SQL is remarkably efficient at providing ROW_NUMBER), it's the multiple uses of it and thus multiple scans of...
July 5, 2022 at 11:37 pm
For (4), some/many of you may be wondering, "Why on earth would you ever have a trigger returning an identity value?"
But, yes, there is actually a good reason for doing...
July 5, 2022 at 11:21 pm
ok, that's not what I thought you meant. I thought you meant flip all the bits.
This works for 0 and 1:
DECLARE @smallint smallint =...
July 5, 2022 at 11:18 pm
I strongly suspect that the specific proc nor statement is available, since the "standard" dm_* views don't include that data.
If you could post the proc itself, I will look and...
July 5, 2022 at 11:17 pm
ok, that's not what I thought you meant. I thought you meant flip all the bits.
This works for 0 and 1:
DECLARE @smallint smallint =...
July 5, 2022 at 11:09 pm
I'm trying to think of a more efficient way, but for now this should at least function correctly:
;WITH cte_add_row_num AS (
SELECT *, ROW_NUMBER()...
July 5, 2022 at 11:07 pm
What are the datatypes for the two columns in Question #1?
smallint and char(3) (and I have added the data types to the original post).
July 5, 2022 at 10:35 pm
ok, that's not what I thought you meant. I thought you meant flip all the bits.
This works for 0 and 1:
DECLARE @smallint smallint = 0
select @smallint...
July 5, 2022 at 10:25 pm
Viewing 15 posts - 736 through 750 (of 7,597 total)