Viewing 9 posts - 1 through 10 (of 10 total)
No, I can't drop the index on the view in production, since it supports a count query that runs thousands of times per minute.
Will look into the FK indexes...
February 26, 2024 at 12:58 pm
I was hoping that deleting multiple rows in a single statement would improve the overall performance, but deleting 5 rows yielded slightly over 5x the runtime:
February 26, 2024 at 10:44 am
Here are the statistics after restoring the indexed view and adding the recommended non-clustered index from the execution plan:
February 26, 2024 at 10:36 am
Here are the query stats before and after removing the index on the view:
February 26, 2024 at 10:28 am
CREATE UNIQUE CLUSTERED INDEX [IX_AlertsCount] ON [dbo].[vqryAlertsCount]
(
[EntityID] ASC,
[UserID] ASC,
[AlertOwnerID] ASC,
[PostponedUntil] ASC
)WITH...
February 22, 2024 at 3:05 pm
Because of this indirect reference, that suggested index may have way more impact than estimated.
February 21, 2024 at 7:08 pm
I was curious about that as well but then I found the materialized view that references the columns in question:
CREATE VIEW [dbo].[vqryAlertsCount]
WITH SCHEMABINDING
AS
SELECT...
February 21, 2024 at 7:06 pm
That table has ~ 62k rows, which is probably why the index recommendation is for there for that table. Most of the other table are in the hundreds of rows...
February 21, 2024 at 5:41 pm
A lot of the child tables have very few rows, so I don't think an index on the FK column would have much effect.
February 21, 2024 at 4:48 pm
Viewing 9 posts - 1 through 10 (of 10 total)