I have a query that is instant when hard-coding a value in the WHERE clause but when using the value from a joined table the query just never finishes.
I cannot figur