C2025-027-AnnotationsTypeSelect #574
@@ -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
|
||||
GO
|
||||
|
||||
-- C2025-027 Annotation Type Filtering
|
||||
mschill marked this conversation as resolved
Outdated
mschill
commented
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
plarsen
commented
Added an index. Added an index.
mschill
commented
Comment still valid: index should be UNIQUE by 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,
mschill
commented
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.
|
||||
|
remove:
, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF
This was what we caught was not compatible with SQL 2016