I have read about the 61 table join limit in MySQL 5, but I'm not sure how it would apply to the folllowing:
SELECT * FROM (
SELECT * FROM tableA JOIN // Lots of other joins here...
UNION
SELECT * FROM tableB JOIN // Lots of other joins here...
UNION
SELECT * FROM tableC JOIN // Lots of other joins here...
// etc...
)
Would I hit the limit with 61 tables in total across all the subqueries, or would it be 61 per UNIONed subquery?
Does this vary across DBs e.g. PostgreSQL, MSSQL, Oracle?