If you have many rows where Col3 is NULL, then a filtered index might improve performance a bit.
Probably by far the biggest problem with your query is the DISTINCT keyword. You say that you need it, because the table has duplicate rows. I think it is a mistake to allow this. Or to put it another way: if you cannot find a way to get rid of those duplicates in the table or (indexed) view you are querying, then I doubt you can ever get good performance.
Gert-Jan
No comments:
Post a Comment