IF NOT EXISTS (SELECT Name FROM SysIndexes  WITH (NOLOCK) WHERE Name = 'IX_ConferenceRoomsDateTableHotel')
CREATE NONCLUSTERED INDEX [IX_ConferenceRoomsDateTableHotel] ON [dbo].[CONFERENCEROOMS]
(
	[TableDate] ASC,
	[Istable] ASC,
	[HotelNumber] 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]
GO

IF NOT EXISTS (SELECT Name FROM SysIndexes  WITH (NOLOCK) WHERE Name = 'IX_ConferenceRoomsNumberIsTableChairNumberHotelNumber')
CREATE NONCLUSTERED INDEX [IX_ConferenceRoomsNumberIsTableChairNumberHotelNumber] ON [dbo].[CONFERENCEROOMS]
(
	[Number] ASC,
	[Istable] ASC,
	[ChairNumber] ASC,
	[HotelNumber] ASC
 ) INCLUDE (TableDate) ON [PRIMARY] 
GO

IF NOT EXISTS (SELECT Name FROM SysIndexes WITH (NOLOCK) WHERE Name = 'IX_KitchenStatement_FolioNumber')
CREATE NONCLUSTERED INDEX [IX_KitchenStatement_FolioNumber] ON [dbo].[KitchenStatement]
(
	[FolioNumber] DESC
 ) ON [PRIMARY] 
GO

IF NOT EXISTS (SELECT Name FROM SysIndexes  WITH (NOLOCK) WHERE Name = 'IX_ReservationRoomline_Products')
	CREATE NONCLUSTERED INDEX [IX_ReservationRoomline_Products]
	ON [dbo].[RESERVATIONROOMLINE] ([RoomNumber])
	INCLUDE ([LINENUMBER],[ArrivalDate],[ArrivalTime],[DepartureDate],[DepartureTime],[ProductNumber],[ProductNumber2],[ProductNumber3],[ProductNumber4])
GO
