Anybody know whether an SQL statement that uses multiple UNIONS is supposed to take a lot more time to execute versus issuing two or three separate SQL statement and manually joining the results?
I have an SQL statement that's basically 4 separate SQL's. On their own, each SQL statement takes about 3 seconds to run. But when I put them all together with the UNION clause, it takes about 2+ minutes to run instead. The output is the same whether I use the single SQL statement with UNIONS or run each of the 4 SQL statements separately and put them into a single table using something like APPEND FROM DBF("OneofMytables").
Ernie Veniegas
Micro System Solutions
... sensible software by design