Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Order of selected rows.

Re: Order of selected rows.

From: Kai Horstmann <horst_at_werum.de>
Date: Wed, 27 Jan 1999 23:48:57 +0100
Message-ID: <36AF97D9.3EACAD30@werum.de>


Erika Grondzakova schrieb:
> > > Could I rely on that when I run several times the SELECT statement > > > of
> > > the HIERARCHICAL query, I will receive the same order of the > > > selected
> > > rows?
> > > Especially I'm interested in the same order of the rows on the > > > > > same
> > > level.

Sorry, that was a misunderstanding.

A hierarchical query should always deliver the same result. But I think the order of the items found on the same level is not well defined. The order of the hierarchie is always defined.

Perhaps you can get the defined order on the same level, if you create an index on (parent,name). This should be the only index on parent. If the successors are evaluated, Oracle should use the index (parent,name) to find the successors. When running through this index, the correct order should be achieved.

This is only a suggestion. I cannot evaluate it now. I didn't get much time these days.
Please try it yourself. Perhaps a look at the execution plan is helpful.

I would be interested in results of your tests. Send me a Qark, when you crack some atoms.

Kai Received on Wed Jan 27 1999 - 16:48:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US