Viewing 15 posts - 901 through 915 (of 7,614 total)
Right, because reorganize only ever needs 1 extra work page, the in_tempdb option is really meaningless for reorg.
April 25, 2022 at 7:22 pm
SELECT SubmissionGuid
FROM #Subs
GROUP BY SubmissionGuid
HAVING MAX(CASE WHEN QuoteStatus = 1 THEN 1 ELSE 0 END) = 0
April 25, 2022 at 7:20 pm
To avoid using the user db for index rebuild work space, look into specifying SORT_IN_TEMPDB = ON as part of the index REBUILD. This is especially true if you have...
April 25, 2022 at 5:42 pm
For best performance, make sure you have the log table properly clustered. Specifically, if you intend to delete by log time, as is quite typical, then cluster the table that...
April 25, 2022 at 2:55 pm
Rather than adding a month and taking away a day to get the end of month (which is how I have always done it) there is a function called...
April 22, 2022 at 8:03 pm
I suspect there's some way to do this without recursion, but for now, here's a method using recursion.
DECLARE @amount_to_spend decimal(9, 2)
SET @amount_to_spend = 50.00
;WITH cte_products_by_price AS (
...
April 22, 2022 at 8:00 pm
;WITH
cte_tally10 AS (
SELECT * FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) AS numbers(number)
),
cte_tally100 AS (
SELECT 0 AS number UNION ALL
SELECT...
April 22, 2022 at 7:23 pm
I don't think you don't need an explicit COMMIT and ROLLBACK. In SQL Server, by default each SQL statement that modifies data will be in its own transaction.
Specify "SET XACT_ABORT...
April 21, 2022 at 2:41 pm
but my understanding is that the -kill command does not kill connections that are in "Rollback" and unfortunately, we seem to have connections in ROLLBACK.
To the first point, there's...
April 18, 2022 at 6:51 pm
One place to start is reviewing the "Top 10 Avg I/O Queries". See if anything stands out there.
Next I'd review the index stats. Looking particularly at missing indexes and the...
April 15, 2022 at 7:31 pm
ScottPletcher wrote:Didn't you already ask this q?!
According to the OPs profile, no. In fact, this appears to be the first and only question they've posted.
OK. Sorry, my bad, it...
April 15, 2022 at 3:30 pm
Didn't you already ask this q?!
April 14, 2022 at 6:35 pm
Yes, there is a better way. You can use CROSS APPLY(s) to assign alias name(s).
SELECT [Date Req Created], [Date Initiated], ...
FROM ...
CROSS APPLY (
SELECT NULLIF(A.CALC_Date_EOIReceived,...
April 14, 2022 at 2:55 pm
(1) Download SQL Server Developer Edition. (Hint: it's free!)
(2) Get books by Itzik Ben-Gan (for T-SQL learning) or, for DBA/system learning, the "Inside SQL Server" books by MS.
(3) Do the...
April 12, 2022 at 6:00 pm
Viewing 15 posts - 901 through 915 (of 7,614 total)