• This should be faster (if your WHERE clause indeed includes first columns from the index where Date is mentioned):

    SELECT TOP 1 @MaxDate = Date FROM Table1

    WHERE {Conditions on init cols of the index}

    ORDER BY Date DESC

    SELECT TOP 1 @MinDate = Date FROM Table1

    WHERE {Conditions on init cols of the index}

    ORDER BY Date

    _____________
    Code for TallyGenerator