Say I have the following as a join in a larger query aliased as 'overall'
INNER JOIN (SELECT
tts.typ,tts.amount,
tts.term_sale_id,
tts.term_sale_id,
tts.from_price
FROM tb_term_sale_entries tts
WHERE tts.start_date <= '#dateformat(now(),'mm/dd/yyyy')# 23:59:00'
AND tts.end_date >= '#dateformat(now(),'mm/dd/yyyy')# 23:59:00'
AND tts.style_id = overall.style_id) term_sale ON (tts.style_id = overall.style_id)
When SQL is handling this query, does it create the term_sale table one time and then join it as needed, or does it create term_sale for each row of the main query?
In the above, I have the join condition twice, once in the subquery and once outside in the join statement. My question is which is generally more efficient?