Oracle Tips

Oracle Performance and Common Error Tips

ORA-01013: User requested cancel of current operation:
If the user didn't request cancel of current operation, then check that the Oracle ODBC driver does not have a query timeout value of 30 seconds. If it does you can add a parameter to the connection string to disable Query Timeouts: QTO=F

Performance: Select *
Replace Select * in queries with an exact set of columns needed. Reduces network traffic and Oracle memory usage and workload.
Less space means Oracle can cache more important information.

Performance: Rule Based Optimization
Note: The Oracle optimizer reads the FROM clause
from Right to Left as an optimization tip.
The rightmost table should contain the best/most restrictive clause in the query.

JDBC: Query Sequence for Currval or Nextval
Usually, in an INSERT you would add the Sequence.Nextval in the Values section of the Sql statement,
but, you could write a PreparedStatement using "SELECT Sequence.Nextval FROM DUAL" if you needed the value for use in a child table.