Topic: Performance & Tuning >> About "Connect by Prior".. any suggestion, please
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Title: About "Connect by Prior".. any suggestion, please |
| Majda |
Posted: Dec 05, 2005 02:14:42 PM |
Total Post: 3
Joined: Dec, 2005
|
Hello every Dba and every body,
Here is my SQL order and I try to re-write it, because it's so slow ...
but I don't know how to do ... Because, I'm not used to work with "connect by"
"
select max(col3)
from toto
having rownum = 1
group by rownum
connect by prior col1 = col2
start with col2 = 'TTTT';
"
Thank you very much in advance.
|
|
|
Vigyan |
| Posted: Dec 05, 2005 02:33:28 PM | |
|
Total Post: 386
Joined: May, 2001
|
Did you tried running queries without the following.
having rownum = 1
group by rownum
Do you need it?
Vigyan
|
|
|
|
|
Majda |
| Posted: Dec 05, 2005 02:44:05 PM | |
|
Total Post: 3
Joined: Dec, 2005
|
hi Vigyan,
In fact, I don't understand this order ...
It was is writed by another user who left our service.
And I'm not used to work with "connect by Prior" ...
I dont' understand what is the utility of "rownum=1" on "Connect Prior order" ...
If anyone has any idea, thank a lot ...
|
|
|
|
|
Vigyan |
| Posted: Dec 05, 2005 03:28:48 PM | |
|
Total Post: 386
Joined: May, 2001
|
I dont think, you need rownum condition.
Read the document for Oracle Hierarchical queries at the following link.
http://www.oracle.com/technology/oramag/webcolumns/2003/techarticles/gennick_connectby_pt2.html
Hope it helps.
Vigyan
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 815 |
| Mohammed Taj | 704 |
| Jayanta Sur | 479 |
| positive fanatic | 416 |
| Vigyan Kaushik | 386 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 242 |
| neeraj sharma | 231 |
| Ramesh Jois | 226 |
| Bishal Khetan | 196 |
|
|