C2025-027-AnnotationsTypeSelect #574

Merged
jjenko merged 10 commits from C2025-027-AnnotationsTypeSelect into Development 2025-07-30 08:23:07 -04:00
13 changed files with 2293 additions and 1277 deletions
Showing only changes of commit 655592186b - Show all commits

View File

@@ -24116,7 +24116,7 @@ CREATE UNIQUE INDEX [idx_AnnotationTypeSelections_UserIDTypeID] ON [dbo].[Annota
[TypeID] ASC
)
INCLUDE (ASTypeID)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
mschill marked this conversation as resolved Outdated

remove:

, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF

This was what we caught was not compatible with SQL 2016

remove: , OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF This was what we caught was not compatible with SQL 2016
GO
-- C2025-027 Annotation Type Filtering
mschill marked this conversation as resolved Outdated

Wouldn't you want the index on UsrID,TypeID?

I also thought name was being removed from this table?

see previous notes / wouldn;t this be UNIQUE by UsrID, TypeID

Wouldn't you want the index on UsrID,TypeID? I also thought name was being removed from this table? see previous notes / wouldn;t this be UNIQUE by UsrID, TypeID

Added an index.

Added an index.

Comment still valid:

index should be UNIQUE by
(1) UsrID, TypeID
or
(2) TypeID, UsrID
and INCLUDE other columns pulled back like:
ASTypeID

for whether it should be (1) or (2), I suggest trying each individually and looking at the execution plan to see which is grabbed / better --- if you need assistance with this, please let me know and I can give assistance as I am quite familiar with looking at the execution plans in SQL,

Comment still valid: index should be UNIQUE by (1) UsrID, TypeID or (2) TypeID, UsrID and INCLUDE other columns pulled back like: ASTypeID for whether it should be (1) or (2), I suggest trying each individually and looking at the execution plan to see which is grabbed / better --- if you need assistance with this, please let me know and I can give assistance as I am quite familiar with looking at the execution plans in SQL,

There is another comment around line 24235that is related to this. It just moved since there have been changes since that comment was made. That one should have likely the exact index needed.

There is another comment around line 24235that is related to this. It just moved since there have been changes since that comment was made. That one should have likely the exact index needed.