Artemesia,
Excuse me, but I couldn't find any details in your post of the Oracle database version you are using. For your information, since Oracle 9i, the rule-based optimizer (RBO) has been replaced by the cost-based optimizer (CBO). In order for the CBO to perform efficiently, you need to perform a task known as "gathering statistics".
There are entire books that are completely devoted to tuning Oracle databases. In fact, there are entire books devoted to tuning SQL statements alone! So your question is very broad, and therefore difficult to provide a satisfactory answer for, in a forum (like this one).
Allow me to suggest that you start with the Oracle documentation, in particular
Oracle Database Performance Tuning Guide. You can access it via the following Web site:
http://www.oracle.com/technology By the way, the things Michael mentioned -- EXPLAIN PLAN, etc -- are described in the "Performance Tuning Guide", I referred you to.
Good Luck,
Avi.
[ February 21, 2006: Message edited by: Avi Abrami ]