Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How is "UNION ALL " work in ORACLE ?
Hi,
I don't understand how actually Oracle execute a SQL statement
that has UNION ALL condition on it.
Let say I have the following SQL :
Select a, b, c
from tb_txn
where txn_code = 'OLN'
UNION ALL
Select a, b, c
from tb_txn_hist
where txn_code = 'OLN';
Is it Oracle will execute the 1st select and put the result into a buffer first then execute the 2nd select and put the result into the same buffer then only fetch all the select records out ?
Is there a way to force it to execute the 1st and 2nd select parallelly ?
What I want is to improve the performance. Currently the txn_code is indexed and it may have up to 300 rows of same the value out of 50 millions records.
Anyone have any idea or suggestion ?
Thank you very much .
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Jan 29 1999 - 02:56:24 CST