• Don't try to write anything over-complicated. The KISS principal applies here.

    Keep the join condition separate from any other filters, which should be written as where conditions.

    Try to use only SARG-able predicates in where and join conditions which you are trying to support with indexes.

    Make sure you have indexes which will support the query, but only provided they won't cause as much or more pain on other operations than they save on this one.

    Don't have any query hints/table hints or anything like that unless you can prove that it's useful.

    Tom