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: Hierarchical Query too slow

Re: Hierarchical Query too slow

From: Sanjay Mishra <oraskm_at_yahoo.com>
Date: 17 Jul 2001 16:43:14 -0700
Message-ID: <eca56b4a.0107171543.7ba1acff@posting.google.com>

Ralf Hofmann <hofmannb_at_informatik.uni-muenchen.de> wrote in message news:<3B54513F.B2043159_at_informatik.uni-muenchen.de>...
> Hallo!
>
> My Data is based on a xml-file. The probleme is:
> find all elements lying under a given element;
> I do this with the CONNECT BY statement, but this is very slowly if many
> (about 2.000) elements are under the given element. In this case, the
> query is much faster, if I check every element(about 40.000) of the
> tree, if it is under the given element. But this tuning is not nice
> because I do not know, how many element the query will find. Does anyone
> know a way to tune the CONNECT BY statement.
>
> Thank you for your help.

Try creating an index on the self referential column. For example, if you have an employee table with emp_id and mgr_id columns and you perform connect by based on mgr_id = prior emp_id, try creating an index on mgr_id. This should help you query performance. Received on Tue Jul 17 2001 - 18:43:14 CDT

Original text of this message

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