473,385 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Rule Based Optimization

We have a Siebel implementation and for one query that was taking a long
time to run I asked a DBA to evaluate the explain plan. I noticed that
he chose to evaluate the Rule based optimization. I asked him why and
he said that the Siebel application defaults to Rule based optimization.

Not that I don't trust him, but I had the impression that Cost based was
the way to go.

Is it possible to set up a database schema so that it the optimizer
always uses Rule based rather than Cost ? And if anyone knows Siebel,
is this the actual default ?
Thanks.

Jul 19 '05 #1
5 7099

"Terry Coccoli" <re*****@ifneeded.com> wrote in message
news:Gi***********************@news.easynews.com.. .
We have a Siebel implementation and for one query that was taking a long
time to run I asked a DBA to evaluate the explain plan. I noticed that
he chose to evaluate the Rule based optimization. I asked him why and
he said that the Siebel application defaults to Rule based optimization.

Not that I don't trust him, but I had the impression that Cost based was
the way to go.

Is it possible to set up a database schema so that it the optimizer
always uses Rule based rather than Cost ? And if anyone knows Siebel,
is this the actual default ?
Thanks.


Siebel is rule based.
They are about 5 years behind in taking advantage of the database technology
that the system runs on. Yes, cost is the way to go but not with Siebel.
They won't support you if you use rule based. (which means you can't do a
whole bunch of things) One thing that you can do to get around this is that
if you have a specific query that is better under cost based you can use a
stored outline. (get Thomas Kyte's book)
Jim
Jul 19 '05 #2
Jim Kennedy wrote:
"Terry Coccoli" <re*****@ifneeded.com> wrote in message
news:Gi***********************@news.easynews.com.. .
We have a Siebel implementation and for one query that was taking a long
time to run I asked a DBA to evaluate the explain plan. I noticed that
he chose to evaluate the Rule based optimization. I asked him why and
he said that the Siebel application defaults to Rule based optimization.

Not that I don't trust him, but I had the impression that Cost based was
the way to go.

Is it possible to set up a database schema so that it the optimizer
always uses Rule based rather than Cost ? And if anyone knows Siebel,
is this the actual default ?
Thanks.

Siebel is rule based.
They are about 5 years behind in taking advantage of the database technology
that the system runs on. Yes, cost is the way to go but not with Siebel.
They won't support you if you use rule based. (which means you can't do a
whole bunch of things) One thing that you can do to get around this is that
if you have a specific query that is better under cost based you can use a
stored outline. (get Thomas Kyte's book)
Jim

What happens if you throw in a hint like FIRST_ROWS? Would the
optimizer accept the hint ?

Jul 19 '05 #3

"Terry Coccoli" <re*****@ifneeded.com> wrote in message
news:nu***********************@news.easynews.com.. .
Jim Kennedy wrote:
"Terry Coccoli" <re*****@ifneeded.com> wrote in message
news:Gi***********************@news.easynews.com.. .
We have a Siebel implementation and for one query that was taking a long
time to run I asked a DBA to evaluate the explain plan. I noticed that
he chose to evaluate the Rule based optimization. I asked him why and
he said that the Siebel application defaults to Rule based optimization.

Not that I don't trust him, but I had the impression that Cost based was
the way to go.

Is it possible to set up a database schema so that it the optimizer
always uses Rule based rather than Cost ? And if anyone knows Siebel,
is this the actual default ?
Thanks.

Siebel is rule based.
They are about 5 years behind in taking advantage of the database technology that the system runs on. Yes, cost is the way to go but not with Siebel. They won't support you if you use rule based. (which means you can't do a whole bunch of things) One thing that you can do to get around this is that if you have a specific query that is better under cost based you can use a stored outline. (get Thomas Kyte's book)
Jim

What happens if you throw in a hint like FIRST_ROWS? Would the
optimizer accept the hint ?

No, because it is rule based. Also you don't have access to edit the SQL
Siebel generates for the system. You can however use a logon trigger and
set up stored outlines. See Tom Kyte's book for excellent examples of how
to do this. (Expert 1 on 1 Oracle)

Jim
Jul 19 '05 #4
> What happens if you throw in a hint like FIRST_ROWS? Would the
optimizer accept the hint ?


If you throw any hint to a query (except "RULE"), cost-based
optimizing is triggered. In that case, since you probably don't have
any stats for your tables, Oracle will try to make up these stats by
itself, using criteria such as number of extents used by a table (to
estimate its size), ... Oracle usually does a decent job at making up
these stats (from what I've seen), but of course it would be much
better to have real up-to-date stats if you intend to use CBO for some
queries. If you decide to go that route (use hints and gather the
stats), make sure that OPTIMIZER_MODE (for the instance running
Siebel) is RULE (and not CHOOSE), or otherwise CBO will be used for
all the queries (including the ones from the Siebel application)
running against the database, and your Siebel TAM will slap your
fingers.

Daniel Roy
IBM
Siebel/Oracle Consultant
Jul 19 '05 #5
Daniel Roy wrote:
What happens if you throw in a hint like FIRST_ROWS? Would the
optimizer accept the hint ?

If you throw any hint to a query (except "RULE"), cost-based
optimizing is triggered. In that case, since you probably don't have
any stats for your tables, Oracle will try to make up these stats by
itself, using criteria such as number of extents used by a table (to
estimate its size), ... Oracle usually does a decent job at making up
these stats (from what I've seen), but of course it would be much
better to have real up-to-date stats if you intend to use CBO for some
queries. If you decide to go that route (use hints and gather the
stats), make sure that OPTIMIZER_MODE (for the instance running
Siebel) is RULE (and not CHOOSE), or otherwise CBO will be used for
all the queries (including the ones from the Siebel application)
running against the database, and your Siebel TAM will slap your
fingers.

Daniel Roy
IBM
Siebel/Oracle Consultant

Thanks for the headsup, Roy. I think you've given me a couple of
questions that I need to discuss with the DBA.

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mike | last post by:
Related to another topic I just posted, I wanted to discuss ways to optimize the validation of very large (>100MB) XML documents. First, I have no idea if something like this already exists; it...
7
by: Jean-David Beyer | last post by:
I have six hard drives (4 SCSI and 2 EIDE) on my main machine with parts of a database on each drive. The main index is on one SCSI drive all to itself. The main data are on the other three SCSI...
0
by: Steve V | last post by:
I'm using Access 2000 to build a budgeting/tracking database. Can I make a validation rule (using VBA) that checks the data as if the record has already been added? I've got 5 tables (only the...
145
by: Sidney Cadot | last post by:
Hi all, In a discussion with Tak-Shing Chan the question came up whether the as-if rule can cover I/O functions. Basically, he maintains it can, and I think it doesn't. Consider two...
4
by: ron | last post by:
I have a access based guest book. I want to create a validation rule to block certain words or parts of a srting. How do i do this? ie: this is a nice site. come visit my porn site at www.abc.zy...
33
by: Snis Pilbor | last post by:
With the "as if" rule in play, doesn't that effectively render the "register" keyword completely useless? Example: I make a silly compiler which creates code that goes out of its way to take a...
3
by: siyoyok007 | last post by:
Acctually i've being ask to develop a rule based system and the platform to be used is visual basic 6.0. What i want to know here is, how to implement the "Rule based" in VB. Can someone give some...
5
by: Terry Coccoli | last post by:
We have a Siebel implementation and for one query that was taking a long time to run I asked a DBA to evaluate the explain plan. I noticed that he chose to evaluate the Rule based optimization. I...
1
by: MLH | last post by:
Anyone remember if A97 append query failure would ever report data breaking validation rule when such was not the case. I have an old SQL statement - several years old now. I've encountered a case...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.