I am trying to combine 5 different tables from 5 different schemas on the same connection using UNION. With those 5 tables being combined I need to do a subquery to a different connection. Am I able to do a subquery after I combine the tables or do I need to do a subquery for each UNION?
Another related question and the reason I’m wanting to do one subquery instead of 5. The subquery is on a different connection and even just selecting a column in a table or adding a where clause causes Toad Data Point to seemingly freezes for minutes before it completes one of those two things I mentioned. Is this normal of cross-connection subqueries or is there something I can do to speed that up?