Oracle Union Query very slow.

I have this oracle query which uses union to build a list from two tables. For some reason it is very slow.

Can anyone suggest some improvements [Other than changing the crappy server..:)]

there are two tables. FCLIENT and FSALE. FCLIENT has 13000+ records and FSALE has 70000+ records. I personally think Oracle should handle this pretty well, but it is very slow.

Thanks

================================================================
select C_SEQUENCE as SEQ, C_REC_NO as RECNO, C_FIRSTNAME_INTL as FIRSTNAME, C_SURNAME as LASTNAME, C_TELEPHONE as PHONE, C_DATE_INPUT as INPUTDATE, C_POSTAL_CODE as POSTAL, C_LANGUAGE as LANG, C_ORGANIZATION as ORGANIZATION, C_CITY as CITY,0 as TICKET ,'FCLIENT' as WHICHTABLE  
from FCLIENT union  
select FS_ORDER_NUM as SEQ, 0 as RECNO, FS_FNAME as FIRSTNAME, FS_LNAME as LASTNAME,  
FS_TEL as PHONE, FS_DATE_INPUT as INPUTDATE, FS_POST_CODE as POSTAL, FS_LANGUAGE as LANG,
FS_COMPANY as ORGANIZATION, FS_CITY as CITY,FS_ORDER_NUM as TICKET,'FSALE' as WHICHTABLE  
from FSALE

LVL 1
qudoosAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ToddBarryCommented:
First off, I would change that to a UNION ALL which will avoid the unnecessary distinct of the result in this case.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
qudoosAuthor Commented:
I have never seen such performance boost with the addition of just 1 word !!!

it rocks man !
0
qudoosAuthor Commented:
by the way what would you do secondly ?:)
0
ToddBarryCommented:
I was SO sure that would help I never had a fallback suggestion... <grin>
0
qudoosAuthor Commented:
what a witty answer man ! have a great weekend
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.