SQL Language (MOSC)

MOSC Banner

Index on hierarchical query

edited Feb 8, 2012 3:37AM in SQL Language (MOSC) 15 commentsAnswered
 Hello,
I wrote a hierarchical query on a GLOBAL TEMPORARY TABLE that have LEVEL in where condition.

 CURSOR CUR_TREE (CURRENT_LEVEL IN NUMBER)
      IS
             SELECT TABLE_PK,
                    TABLE_FK,
                    TABLE_XML
               FROM KID_XML_TREE_GTT
              WHERE LEVEL = CURRENT_LEVEL
         CONNECT BY PRIOR TABLE_PK = TABLE_FK
         START WITH TABLE_FK IS NULL;

I put the primary key on the column TABLE_PK and no more indexes.

Where I can put an index to make it faster? I have to remove the PK to make it faster?

Thanks

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center