Re: How to tweak hierarchial SQL queries?

From: Bruce Douglas <bruce.douglas_at_bridge.bst.bls.com>
Date: 1995/12/02
Message-ID: <NEWTNews.817928196.28817.bruce_at_ga.bst.bls.com>#1/1


> : Is there any way to affect the order in which "siblings" are returned (IN
CONNECT BY PRIOR...)?
>
> Here's an idea, which I have not experimented with:
>
> Given that the predicate for this type of query is:
>
> colA = prior colB
>
> if you had an index on (colA, colB), then the join could be done
> by reference to that index, and the colB entries would automatically
> be in order.
>
> --
> Jonathan Lewis

Hallelujah!! Creating a (parent,child) index sorts things properly for my query. I plan on doing two more things before exhaling completely: 1) making sure the solution is a general one; 2) reading up on Oracle's physical implementation of indexes to try to understand better *why* it works.

Thanks again, to everyone who responded.

cheers--bd



Bruce Douglas - BellSouth Telecommunications <bruce.douglas_at_bridge.bst.bls.com>
Received on Sat Dec 02 1995 - 00:00:00 CET

Original text of this message