Viewing 15 posts - 1,441 through 1,455 (of 2,883 total)
If I am understanding you correctly, you want to know the second largest record. If so, one way you could do this is to do a nested SELECT TOP query. ...
November 27, 2020 at 6:50 pm
From my understanding both IDX1 and IDX2 would use the exact same space. They are holding the exact same data, just in potentially a different order.
If there is any compression...
November 27, 2020 at 2:10 pm
I think I can help with that one.
IDX1 would have the 3 columns with the data ordered by OrderID, then ItemID, and finally Status. If there were more columns in...
November 26, 2020 at 3:45 pm
Looks like someone asked about this on the MSDN forums and got a few answers:
The important bits from the above forum post (the whole thing is a good read mind...
November 25, 2020 at 5:06 pm
Alternate to triggers, but similar idea, you could implement CDC (change data capture).
If the database table is for a custom-built app, you could also implement audit history like that on...
November 24, 2020 at 7:29 pm
How many rows are in the table?
I am pretty sure that your WHERE clause is the problem, not the ROW_NUMBER portion. The query, without the WHERE doesn't need to do...
November 24, 2020 at 3:53 pm
If you load up extended events or profiler, you can see what is being run against the database.
My guess (without seeing anything) is that your shared dataset doesn't have the...
November 24, 2020 at 3:44 pm
Just to confirm - you don't have any triggers on the table, right? Those can cause all sorts of surprises like that.
November 20, 2020 at 9:42 pm
William - to address both replies (Jeffery and sterling3721, correct me if I am misrepresenting):
1 - the new driver MAY have some optimizations in it that cause it to give...
November 19, 2020 at 10:11 pm
My guess - your queries don't need to use all of the cores OR your SQL isn't configured to use all of the cores when going parallel... which is best...
November 19, 2020 at 6:04 pm
I imagine you could build up a DLL that could handle it and do some magic on the SQL side, but it is not going to be a quick operation.
Alternately,...
November 19, 2020 at 6:01 pm
I am not 100% sure, but I am about 95% sure that that is not possible and would be a HUGE performance hit to go that route anyways. A better...
November 19, 2020 at 2:56 pm
Locks are a required part of SQL Server. You wouldn't want 2 queries updating a single piece of data at the exact same time. Much better for them to run...
November 18, 2020 at 2:28 pm
Just to confirm - you are NOT reindexing anything during that job step, right?
I just found this post:
https://www.sqlservercentral.com/forums/topic/sql-job-fails-giving-message-2528
which says that message 2528:
"The message 2528 is what DBCC Reindex always outputs"
November 17, 2020 at 9:45 pm
When you say it is not returning a number, what is it returning?
Also, in your code, you are declaring @newID as a VARCHAR and then setting it to the result...
November 16, 2020 at 2:38 pm
Viewing 15 posts - 1,441 through 1,455 (of 2,883 total)