Unix Technical Forum

How to improve query performance with ,,connect by" clause?

This is a discussion on How to improve query performance with ,,connect by" clause? within the Oracle Database forums, part of the Database Server Software category; --> I use CONNECT BY clause but it performs very slow though I use indexes. Any suggests how to speed ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 03:54 AM
Paul
 
Posts: n/a
Default How to improve query performance with ,,connect by" clause?

I use CONNECT BY clause but it performs very slow though I use indexes.
Any suggests how to speed up the performance?

thx in advance

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 03:54 AM
Dirk Gomez
 
Posts: n/a
Default Re: How to improve query performance with ,,connect by" clause?

> I use CONNECT BY clause but it performs very slow though I use indexes.
> Any suggests how to speed up the performance?


Please post at least the query and the query plan.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 03:54 AM
Mark D Powell
 
Posts: n/a
Default Re: How to improve query performance with ,,connect by" clause?



On Dec 14, 4:50 am, Dirk Gomez <use...@dirkgomez.de> wrote:
> > I use CONNECT BY clause but it performs very slow though I use indexes.
> > Any suggests how to speed up the performance?Please post at least the query and the query plan.


Yes, posting the actual SQL and the explain plan would be a good step.

In the example of the EMP table where empno and manager can be used in
a connect by relationship you would generally want an index not just on
empno but also on manager. If you have both indexes and the stats are
current then the CBO should be able to determine if the indexes or a
hash join is the better option.

Use of the 9i and up ability to use a connect by clause and perform a
to the same table would potentially complicate the SQL but just tune
the connect and tune the join.

Take a look at the amount of data that you have to process and then
estimate the run time and compare that to what you are getting. This
will help limit your expectations to reality.

HTH -- Mark D Powell --

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com