Viewing 15 posts - 706 through 720 (of 2,648 total)
Yeah, Cost Threshold for Parallelism is way too low. That is likely causing the crazy spikes in response/CPU times.
I think 5 is the out of the box default setting.
I've...
July 6, 2022 at 9:21 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.
I take it you...
July 6, 2022 at 6:53 pm
I've run it again after a reboot and closing the Chrome, the figures are more consistent but my first method is faster by a long way (on my desktop). For...
July 6, 2022 at 9:20 am
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 execution...
July 6, 2022 at 1:21 am
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: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...
July 5, 2022 at 11:03 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:03 pm
1
SELECT t.*
FROM MyTable t
CROSS APPLY (VALUES ('Jan', 1),('Feb', 2),('Mar', 3),('Apr', 4),('May', 5),('Jun', 6),('Jul', 7),('Aug', 8),('Sep', 9),('Oct', 10),('Nov', 11),('Dec', 12))...
July 5, 2022 at 9:52 pm
1
SELECT t.*
FROM MyTable t
CROSS APPLY (VALUES ('Jan', 1),('Feb', 2),('Mar', 3),('Apr', 4),('May', 5),('Jun', 6),('Jul', 7),('Aug', 8),('Sep', 9),('Oct', 10),('Nov', 11),('Dec', 12)) M(Name,N)
...
July 5, 2022 at 9:29 pm
1
SELECT t.*
FROM MyTable t
CROSS APPLY (VALUES ('Jan', 1),('Feb', 2),('Mar', 3),('Apr', 4),('May', 5),('Jun', 6),('Jul', 7),('Aug', 8),('Sep', 9),('Oct', 10),('Nov', 11),('Dec', 12)) M(Name,N)
...
July 5, 2022 at 8:49 pm
First option is the correct relational way to design it.
July 5, 2022 at 1:25 pm
Jonathan AC Roberts wrote:Yes, I wasn't really thinking about performance either as that wasn't mentioned in the question.
There is no question!
I took "I need to update my sql...
July 5, 2022 at 9:51 am
Jonathan AC Roberts wrote:Yes, I wasn't really thinking about performance either as that wasn't mentioned in the question.
There is no question!
I took "I need to update my sql script and...
July 5, 2022 at 9:26 am
Probably so he can get away from having to run two separate queries and then merge the results with a distinct UNION. That may or may not be faster,...
July 5, 2022 at 9:22 am
Heh... there is an EXCEPT, though... same "class" of method.
Yes, but it doesn't have a union which is all that was asked.
Why do you think the OP wants to...
July 5, 2022 at 12:23 am
Viewing 15 posts - 706 through 720 (of 2,648 total)