02-16-06, 20:38 #1Registered User
- Join Date
- Feb 2006
Unanswered: Equivalent of Hierarchy SQL in Oracle
We have some performance issues with 'CONNECT BY PRIOR' SQL statement and trying to find an alternate SQL which gives the same output.
SELECT enum, mgr FROM <table> START WITH enum IS NULL
CONNECT BY PRIOR enum = mgr;
How do I get the same output without using CONNECT BY PRIOR command. I dont mind creating a new table that will keep all the possible combinations between enum and mgr columns.
Please provide your solution. I really appreciate it.
Thanks in advance,
02-16-06, 23:30 #2Registered User
Provided Answers: 1
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
>I dont mind creating a new table that will keep all the possible combinations between enum and mgr columns.
So what is stopping you from do so?
Please post your results back here so we can benefit from your efforts.
What leads you to conclude that new table will perform any faster?
As a learning exercise for all concerned, please post the EXPLAIN PLAN for your CONNECT BY statement.
HAND!You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.