Know what you code
•What is the main, most-selective filter that will trim the result set from the unfiltered rowcount of the root detail table to the desired rowcount? If this isn’t obvious to the casual SQL reviewer, make it obvious, with comments.
•Is there a clean, indexed path to that that best filter, and to the other big tables, from there, and have you provided it?
•