Viewing 15 posts - 1 through 15 (of 133 total)
I lean towards Uwe's solution, especially when I need the table to stay online and accept insert/update/delete while I'm deleting data.
I was thinking about this too. One question though. ...
December 10, 2025 at 2:59 pm
Why not creating a NONCLUSTERED Index on the datetime column and "walk in small batches" through the table.
Small chunks of data prevent LOCK ESCALATION and you can run it...
December 8, 2025 at 7:48 pm
Thanks a lot. I can make a plan from that.
November 1, 2025 at 8:06 pm
I also read about using 'SWITCH' to map the data to the backup table, then insert the records back into the original table. Once the data dump is done, I'll...
November 1, 2025 at 7:35 pm
Recently ran into this and none of the solutions I found online worked, so posting my solution here.
I found my issue by checking the SQL server system event logs and...
July 11, 2023 at 6:47 pm
As an example, if I move the where clause to the query, the filter is applied before the dense_rank window.
drop view if exists drview;
go
create view drview
AS
with cte...
January 3, 2023 at 11:02 pm
Sorry, field 3 is a field in the table, it's not the dense rank value. I've updated the original question to include your code with a small update.
January 3, 2023 at 10:47 pm
add_cus_cnt = distinct count of customers per address.
cus_cnt = distinct count of customers
The idea is that getting the addresses that have a distinct count of customers equal to the distinct...
September 30, 2022 at 1:51 pm
This is what I've come up with so far. Can someone grade me on this, or say if you think there's a better way?
with ad as (
...
September 29, 2022 at 6:23 pm
I've just been reading that 2019 has a lot of improvement in the area of the query optimizer, table variables, etc. Not really looking for new features. Just wondering if...
October 5, 2021 at 2:31 pm
Actually, it depends on how the table is searched.
Do you often filter the rows by only type when SELECTing? If so, then the clus index makes sense as is. ...
August 25, 2021 at 12:39 am
Looking at the Clustered Index for the oeordlin_sql table, I'm a wee bit concerned (especially for insert and update performance) over having the leading column be in the "ultra...
August 24, 2021 at 7:39 pm
Here is all the indexes for the tables. If you need different format, let me know. P.S., the view only creates aliases for some of the columns in the...
August 23, 2021 at 8:08 pm
Viewing 15 posts - 1 through 15 (of 133 total)