Viewing 15 posts - 241 through 255 (of 59,063 total)
Too much fun, Michael!
--Jeff Moden
Change is inevitable... Change for the better is not.
December 17, 2024 at 3:42 am
I have to disagree with the answer here. If you run the code more than once, it comes up with the same 10 rows. Therefor, they are NOT "random rows"....
--Jeff Moden
Change is inevitable... Change for the better is not.
December 16, 2024 at 6:14 am
Hey Jeff, was simply responding to the question on the scenario you posed.
Totally understood and I was just answering the new question.
Just to say it again, there is no...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 16, 2024 at 5:55 am
Try fixing things, rather than breaking them further.
Now that, I agree with!
A lot of people immediately respond with "Well, just turn on RCSI". Folks really need to be careful...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 12, 2024 at 3:18 pm
Jeff. I'll take a crack at your question:
In your example, are you assuming the date column is indexed and would be used? What if that is not the case,...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 11, 2024 at 7:15 am
Jeff, with RCSI enabled, it’s barely if ever necessary.
Agreed... all you have to do there is accept an extra 14 bytes per row and extra usage of TempDB. Since...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 10, 2024 at 4:05 am
On what grounds?
Uh, because the data is right, and the implementation is right.
You set up a straw man, where this condition applies, and you don't care about this,...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 10, 2024 at 4:04 am
The responses are as expected... some hardcore "NEVER"s.
To those people, I ask, if you want a simple report, say the number of products purchased by day for the previous calendar...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 10, 2024 at 1:14 am
With regard to the following code from the article...
CREATE PROCEDURE dbo.GetDashboardStats
AS
BEGIN
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SELECT
(SELECT COUNT(*) FROM Orders WITH (NOLOCK)
WHERE OrderDate = CAST(GETDATE() AS...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 9, 2024 at 1:46 am
It's gotten to the point where I evaluate changes by determining how much harm the change causes or how little a required change brings to the table compared to the...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 9, 2024 at 1:08 am
Just do a test.
SET STATISTICS TIME,IO ON:
Put code to be tested here.
SET STATISTICS TIME,IO OFF:
Do NOT use this method if any functions that contain the word BEGIN...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 8, 2024 at 6:51 pm
Using YEAR and MONTH Functions:
I'm going to seriously recommend NOT doing it that way. Use the Date Range method, instead.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 8, 2024 at 6:02 pm
You do realize that the addition of the new index requires space that might not have been available and that dropping the first NCI made a bunch of space available,...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 8, 2024 at 5:51 pm
EDIT: Looks like Steve posted while I was working on replies. Leaving this reply here even though it overlaps with Steve's pose.
FOR and AFTER are identical in meaning.
https://learn.microsoft.com/en-us/sql/t-sql/statements/create-trigger-transact-sql#arguments
You're trigger is...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 8, 2024 at 5:42 pm
From the article:
And most people rarely upgrade their OSS. They get something that works and don't want to change. I get that, as I feel the same way...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 8, 2024 at 5:11 pm
Viewing 15 posts - 241 through 255 (of 59,063 total)