• FYI, if you have a GROUP BY in the query with the OR in the JOIN, then you have a different kind of problem, and the solution is more likely to involve "pre-generating" a temp table with perhaps some primary key values that can be used to limit records, after indexing said temp table.   Of course, there's always more than one way to "skin the cat", so to speak.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)