Home » RDBMS Server » Server Administration » oracle optimiser
oracle optimiser [message #369641] Thu, 27 January 2000 01:43 Go to next message
Amber Fatima
Messages: 19
Registered: September 1999
Junior Member
any one know ,how to use oracle optimiser ?
Re: oracle optimiser [message #369645 is a reply to message #369641] Mon, 31 January 2000 06:24 Go to previous messageGo to next message
Amber Fatima
Messages: 19
Registered: September 1999
Junior Member
i did not any found dbinit.ora file ,
in a network of many users connected to one server,how can they all use the oracle optimizer simultaneously?
i am sorry but i still do not understand
Re: oracle optimiser [message #369647 is a reply to message #369641] Tue, 01 February 2000 14:01 Go to previous messageGo to next message
Thierry Van der Auwera
Messages: 44
Registered: January 2000
Member
Hallo Amber,

The file "dbinit.ora", is the database initialization file. Normally is has a specify name.
When you database name is ex : DB1, then the file can be initdb1.ora.
This file is used everytime the database is started up. Which means, that there will exists
only one file like that, and this located at the server.
Ask the DBA of the database about this file.
Now, the oracle optimizer is a also a serverprocess. The database will optimize the query's
launched on the server. So if you have 1000 users or 10 users, it does not mather.
The dba must only analyze the objects ones, and all users will used it like that.
One thing is thrue, when two different users write two different sql's to get the same result,
it is possible that one sql will perform better than the other.
But then we go to performance tuning, which is a very big topic to explai.

Conclusion: The Oracle optimizer, is how the database-server optimize all the query's it's
getting from all the users.

Hope this clear's it out.

Greetings,

Thierry.

If you still have any question, just ask me.
So post a replay to this message.
Re: oracle optimiser [message #369672 is a reply to message #369641] Wed, 01 March 2000 14:48 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
You can control it in your code too as follows:

-- Set it to Rule!
ALTER SESSION SET OPTIMIZER_GOAL=RULE;
select ... from ... where ...;
update ...;
-- Set it to Cost!
ALTER SESSION SET OPTIMIZER_GOAL=COST;

or in the SQL itself:
select /* + rule */ col1, col2
from tab1
where col1...
and col2...;

Below is an example of how to change session settings from different environments (SQL_TRACE is shown).
SQL*Plus:
ALTER SESSION SET SQL_TRACE TRUE;
Pro*C:
EXEC SQL ALTER SESSION SET SQL_TRACE TRUE;
SQL*Windows:
call sqlPrepareAndExecute(hSql," ALTER SESSION SET SQL_TRACE TRUE")
PowerBuilder:
EXECUTE IMMEDIATE ALTER SESSION SET ...
Stored procedures:
dbms_session.set_sql_trace(TRUE)
Previous Topic: Dynamically build Columns for a SQL select
Next Topic: How do i obtain averages.
Goto Forum:
  


Current Time: Thu Mar 28 12:32:25 CDT 2024