IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[STOKMIADBAKIYESAYIM]') AND 
name = N'IXM_STOKMIADBAKIYESAYIM_SUBEID_DEPOID_TARIH')

CREATE NONCLUSTERED INDEX [IXM_STOKMIADBAKIYESAYIM_SUBEID_DEPOID_TARIH]
ON [dbo].[STOKMIADBAKIYESAYIM] ([SUBEID],[DEPOID],[TARIH])
INCLUDE ([STOKID],[SKTARIHI]) 
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90)
GO


IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[DEPOFIS]') AND 
name = N'IXM_DEPOFIS_CDEPOID_SUBEID_TARIH')
CREATE NONCLUSTERED INDEX [IXM_DEPOFIS_CDEPOID_SUBEID_TARIH]
ON [dbo].[DEPOFIS] ([CDEPOID],[SUBEID],[TARIH])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90)
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[DEPOFIS]') AND 
name = N'IXM_DEPOFIS_GDEPOID_SUBEID_TARIH')
CREATE NONCLUSTERED INDEX [IXM_DEPOFIS_GDEPOID_SUBEID_TARIH]
ON [dbo].[DEPOFIS] ([SUBEID],[TARIH],[GDEPOID])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90)

