C2026-044 – ve_GetParentItem Performance Improvement
Added Included columns to Index
This commit is contained in:
@@ -5589,6 +5589,18 @@ IF (@@Error = 0) PRINT 'ScalerFunction [vefn_GetParentItem] Succeeded'
|
|||||||
ELSE PRINT 'ScalerFunction [vefn_GetParentItem] Error on Creation'
|
ELSE PRINT 'ScalerFunction [vefn_GetParentItem] Error on Creation'
|
||||||
go
|
go
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM dbo.sysIndexes WHERE name like 'IX_PartsItemID')
|
||||||
|
DROP INDEX [IX_PartsItemID] ON [dbo].[tblParts];
|
||||||
|
GO
|
||||||
|
|
||||||
|
CREATE NONCLUSTERED INDEX IX_PartsItemID
|
||||||
|
ON [dbo].[tblParts] ([ItemID] ASC)
|
||||||
|
INCLUDE([ContentID],[DeleteStatus],[FromType]) 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]
|
||||||
|
GO
|
||||||
|
|
||||||
|
PRINT 'Added IX_PartsItemID Index. Speeds up Getting Parent Items'
|
||||||
|
GO
|
||||||
|
|
||||||
/****** Object: UserDefinedFunction [dbo].[vefn_CanTransitionBeCreated] Script Date: 10/14/2012 02:03:30 ******/
|
/****** Object: UserDefinedFunction [dbo].[vefn_CanTransitionBeCreated] Script Date: 10/14/2012 02:03:30 ******/
|
||||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_CanTransitionBeCreated]') AND OBJECTPROPERTY(id,N'IsScalarFunction') = 1)
|
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_CanTransitionBeCreated]') AND OBJECTPROPERTY(id,N'IsScalarFunction') = 1)
|
||||||
DROP FUNCTION [vefn_CanTransitionBeCreated];
|
DROP FUNCTION [vefn_CanTransitionBeCreated];
|
||||||
|
|||||||
Reference in New Issue
Block a user