if exists(select* from sys.indexes i where i.[object_id] = object_id('AKUZ.T_MEDICAL_EPISODE', 'U') and i.name = 'IX_MEDICAL_EPISODE_type_')
	DROP INDEX IX_MEDICAL_EPISODE_type_ ON AKUZ.T_MEDICAL_EPISODE;
GO
CREATE INDEX IX_MEDICAL_EPISODE_type_ ON [AKUZ].[T_MEDICAL_EPISODE] ([type_]) INCLUDE ([DateOut]) WITH (FILLFACTOR=100, MAXDOP = 0, SORT_IN_TEMPDB=ON);
GO
if exists(select * from sys.indexes i where i.[object_id] = OBJECT_ID('AKUZ.T_RESOURCE_SCHEDULE', 'U') and i.name = 'IX_T_RESOURCE_SCHEDULE')
	drop index IX_T_RESOURCE_SCHEDULE on AKUZ.T_RESOURCE_SCHEDULE;
go
	CREATE INDEX IX_T_RESOURCE_SCHEDULE ON [AKUZ].[T_RESOURCE_SCHEDULE] ([Resource]) WITH (FILLFACTOR=100, MAXDOP = 0, SORT_IN_TEMPDB=ON);
go

