• Looking at the table the max row length on any data page would be something like 165 bytes and a minimum of about 25, so the data pages for this table would be in the 4 (32KB)-23(184KB) range. A point of history in SQL 6.5 if the table contained less than 41(82KB) data pages it would NEVER use any indexes no matter what hints you gave it. I'm going out on a limb but I wouldn't be surprised in later versions of SQL had a similar rule, I don't know this as fact but for tables of a certain size I'm willing to bet an index won't be used.

    And the LEFT used with the scalar function is likely to degrade performance because that function is fun once for EVERY row. So if that function is fairly complex it can REALLY slow the query down. As far as by how much, that's hard to guess. But you can get real world numbers by replacing that line with:

    [commessa_C_excp].[duedate]

    It will still query it just not used the function, that should give you the with/without metrics.

    CEWII