Question
Help with a Index on sql server
I have a table named AVAILABILITY
ID - IDHOTEL - IDROOM - DATE_FROM - DATE_TO
for each room a hotel insert a period (from - to) when the room in booked
Considering this query
select id, date_from, date_to from AVAILABILITY
where IDHOTEL = #idhotel#
and IDROOM = #idroom#
and DATE_TO >= #dateadd("d",-1,now())#
order by DATE_FROM
Could you suggest me a index to create on the table ?
