Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Performance Issue on small table

Performance Issue on small table

Performance Issue on small table

I am new to Oracle, and have no knowledge on it.
I have a small system, in which only 2 tables get over
10000 records. However, when I writing SQL to retrieve
data ( join from 4 or 5 table ). It takes around 15
minutes to retrieve the date ( around 4000 records will
be selected ). Can anyone tell me what should I do ?

P.S. I have try to look at the plan table, and saw that
amost all table using index scan, and only one table use
full scan. The statistics of the full scan table is (
cost=60, cardinalty=24 ... ) Is it the problem of the
full scan table

RE: Performance Issue on small table

In my experience, the Oracle optimizer does poorly with joins of more than 4 tables.
(1) Learn what all the lines in the Explain Plan mean. Use the Oracle8 Server Tuning Guide.
(2) Especially look for 'CARTESIAN' - a red flag. It can be caused by:
  (2a) a poor ordering of joins.
  (2b) not enough 'joining' criteria. If joining 5 tables, there should be at least 4 criteria that match keys across tables, like 'WHERE A.key = B.key', and each table should be included in it.
(3) check what kind of join is done - Nested Loops, Sort Merge, or Hash.
If Nested Loops, try increasing sort memory before the SQL is executed with:
The default from Oracle is only 64k.More sort and has memory can speed up the SQL amazingly.
(4) Understand the problem and its details. Until you know whether there are 4 tables or 5, you're not likely to succed in tuning the statement.

RE: Performance Issue on small table

It will be the full table scan, always is... <smile>

Cargill's Corporate Web Site
Please don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?"

RE: Performance Issue on small table

Thanks a lot

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close