B2017-061: added an index for a field used in session (multiuser) queries to speed up queries
This commit is contained in:
parent
dd65177acd
commit
b6b58e30a0
@ -8540,6 +8540,17 @@ CREATE NONCLUSTERED INDEX [IX_tblItemsForCopy2] ON [dbo].[tblItems]
|
||||
END
|
||||
GO
|
||||
|
||||
/****** Object: Index [IX_contentsLastChanged] Script Date: 3/21/2017 11:24:00 AM ******/
|
||||
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE name = '[IX_contentsLastChanged]')
|
||||
BEGIN
|
||||
CREATE NONCLUSTERED INDEX [IX_contentsLastChanged] ON [dbo].[tblContents]
|
||||
(
|
||||
[LastChanged] ASC
|
||||
)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]
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
/****** Object: StoredProcedure [CopyItemAndChildren] ******/
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[CopyItemAndChildren]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [CopyItemAndChildren];
|
||||
@ -13041,7 +13052,7 @@ IF (@@Error = 0) PRINT 'StoredProcedure [vesp_CleanUpROAssociations] Succeeded'
|
||||
ELSE PRINT 'StoredProcedure [vesp_CleanUpROAssociations] Error on Creation'
|
||||
go
|
||||
|
||||
PRINT 'Updated vesp_SessionBegin to clear old Owner Records'
|
||||
PRINT 'Added IX_contentsLastChanged Index. Speeds up session queries'
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
/*
|
||||
@ -13068,8 +13079,8 @@ BEGIN TRY -- Try Block
|
||||
set nocount on
|
||||
DECLARE @RevDate varchar(255)
|
||||
DECLARE @RevDescription varchar(255)
|
||||
set @RevDate = '2/27/2017 9:30AM'
|
||||
set @RevDescription = 'Update getContentAuditsSummaryByItemIDandUnitID'
|
||||
set @RevDate = '3/22/2017 9:30AM'
|
||||
set @RevDescription = 'Added IX_contentsLastChanged Index. Speeds up session queries'
|
||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||
IF( @@TRANCOUNT > 0 ) COMMIT
|
||||
|
Loading…
x
Reference in New Issue
Block a user