Viewing 15 posts - 1 through 15 (of 2,610 total)
Since you say the updates are not "extremely frequent", it's mostly an "Insert" index by TenantID. It's a Type 98 Index and since there aren't a large number of...
November 21, 2024 at 2:51 am
Hi Jeff
Thank you for the detailed explanation and advice on Fill Factor settings. It is incredibly helpful.
In our case, the clustered index (TENANTID, ID) will likely see updates to rows...
November 20, 2024 at 10:25 pm
post to get new page
November 20, 2024 at 2:49 am
Jeff,
Have you got any recommendations for the fill factor when I create the new clustered primary keys on (TENANTID, ID)?
Where ID is an identity column on the table.
November 20, 2024 at 2:00 am
Does partitioning by TENANTID improve query performance when most queries are filtered by tenant? For instance, will partitioning reduce the amount of data SQL Server scans, or is...
November 20, 2024 at 1:58 am
Nice.
Also, you don't have to change the FKs in other tables if you need one for just ID. Instead, just add a unqiue nonclus index on ( ID );...
November 20, 2024 at 12:01 am
I've created a stored procedure that takes a table name as a parameter and checks the clustered index column order. If the order is ID, TENANTID, the procedure drops the...
November 19, 2024 at 11:49 pm
Currently deleting using by day
WHERE SpoolStartDt = '2022-09-30 00:00:00.000';
How could I delete a MONTH at a time..
Thanks.
Using YEAR and MONTH Functions:
INSERT INTO #ToDelete (Id)
SELECT Id
...
November 17, 2024 at 9:54 pm
27Million
58,000 per day
Depending on the width of the rows and the number of indexes on the table, deleting a day's worth of rows should typically take no more than...
November 17, 2024 at 5:59 pm
How many rows are added to the table each day? And how many rows are currently in the table?
November 16, 2024 at 6:04 pm
Perfect .. works great ..
Many Thanks...
I’ve revised my original response to correct the delete statement - perhaps it could serve as an example.
I’ve also added WITH (NOLOCK)
on the...
November 16, 2024 at 2:40 pm
This is throwing an error:
-- Populate the batch table with the next set of IDs to delete DELETE TOP (@BatchSize) OUTPUT DELETED.Id INTO #BatchToDelete FROM #ToDelete;
Msg 102, Level 15,...
November 16, 2024 at 2:14 pm
Jonathan can your example include 2 fields I mention above? so I could use a 4hr window as also suggested.
Thanks.
Certainly! Simply include the criteria in the WHERE clause of...
November 15, 2024 at 8:29 pm
When performing deletions on large tables, it is essential to delete rows using the clustered index (in this case, PK(Id)) and process the deletions in small batches. This approach ensures:
Efficiency:...
November 15, 2024 at 7:11 pm
Not quite the same result but has all the info:
SELECT *
FROM #STOCKS1 AS T1
FULL JOIN #STOCKS2 AS T2
...
November 14, 2024 at 4:19 pm
Viewing 15 posts - 1 through 15 (of 2,610 total)