473,320 Members | 1,909 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,320 software developers and data experts.

cost based optimization

Hello. I'm looking for some resources on using the CBO properly.... it
seems that this company is inclining to going to RBO, just because the CBO
sucks... (so they say). I would be more interested in parameters that will
speed up DML statements, and trying to get away from using dbms_stats. (if
possible).

Thanks.

Alex

Jul 19 '05 #1
2 2722
> Hello. I'm looking for some resources on using the CBO properly.... it
seems that this company is inclining to going to RBO, just because the CBO
sucks... (so they say). I would be more interested in parameters that will
speed up DML statements, and trying to get away from using dbms_stats. (if
possible).


The answer is going to vary greatly depending on your Oracle version.
CBO is the way to go, and the only option starting with Oracle 10G.
When you say that the performance sucks under CBO, do you mean
everything, or some queries. If it's everything, you probably have
some database parameter which is not set properly (not enough shared
memory allocated, not enough buffer blocks, sort area too small, ...).
In that case, switching to RBO wouldn't help anything anyway. If it's
specific queries which are running too slowly, ask the DBA to get the
exec plans, and tune them. Some examples of actions which could help
specific queries under CBO include:
- Gather some fresh stats for the tables involved
- Add an index
- Create a histogram on a skewed indexed column

If your DBA is fed up running dbms_stats, you can (with Oracle 9i)
start monitoring tables, and use dbms_stats in a way that with one
statement, only the tables requiring it get their stats refreshed
(look up the doc to see the exact syntax).

HTH

Daniel
Jul 19 '05 #2
da*************@hotmail.com (Daniel Roy) wrote in message news:<37************************@posting.google.co m>...
Hello. I'm looking for some resources on using the CBO properly.... it
seems that this company is inclining to going to RBO, just because the CBO
sucks... (so they say). I would be more interested in parameters that will
speed up DML statements, and trying to get away from using dbms_stats. (if
possible).


The answer is going to vary greatly depending on your Oracle version.
CBO is the way to go, and the only option starting with Oracle 10G.
When you say that the performance sucks under CBO, do you mean
everything, or some queries. If it's everything, you probably have
some database parameter which is not set properly (not enough shared
memory allocated, not enough buffer blocks, sort area too small, ...).
In that case, switching to RBO wouldn't help anything anyway. If it's
specific queries which are running too slowly, ask the DBA to get the
exec plans, and tune them. Some examples of actions which could help
specific queries under CBO include:
- Gather some fresh stats for the tables involved
- Add an index
- Create a histogram on a skewed indexed column

If your DBA is fed up running dbms_stats, you can (with Oracle 9i)
start monitoring tables, and use dbms_stats in a way that with one
statement, only the tables requiring it get their stats refreshed
(look up the doc to see the exact syntax).

HTH

Daniel


I agree that CBO based development is the way to go. Our primary
system is a 300G OLTP MRPII application and we have ran cost based
since version 7.0. Sometimes the CBO is wrong, but that is what
tuning is all about. The majority of times the CBO is either right or
close enough that it does not matter.

HTH -- Mark D Powell --
Jul 19 '05 #3

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

Similar topics

3
by: Dan | last post by:
I am a relatively new user on Oracle 9.2.0.1 and I am having trouble performance tuning this production database. I am running a large query that joins two tables, document(3 mil) and entity(9...
11
by: Unknown User | last post by:
I've been using CSS layout (Tableless) for some time now, and I think it's the best way to create a page, but I've been quite concerned about the raising cost vs. fierce competition in the...
41
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and...
19
by: Andy B | last post by:
Hello, Sorry for this newbish question. Briefly, my problem: ------------------ I expect the database I'm working on to reach something in the order of 12-16 Gigabytes, and I am interested...
7
by: John A Grandy | last post by:
I'm trying to get a decent idea of the relative performance of three types of implementations of data-access classes in ASP.NET 2.0. I believe this boils down to a more basic question regarding...
1
by: jitu78 | last post by:
Hi All, I want to use dreamweaver templates for globtier.com Is this could be bad for site optimization? Is there any risk to loose page rank? Some of SEO experts are suggesting to avoid...
1
by: scan87 | last post by:
Can someone please, please help me in finding the slotuion of the following problem: The cost of one-day travel cards for adult customers on the metro system is based on which zones they cover and...
12
code green
by: code green | last post by:
I need to monitor the change in the cost price of products. The historic cost of every product is stored in a table 'trade' So by comparing the latest two entries per product based on the field...
2
by: Alex Ivascu | last post by:
Hello. I'm looking for some resources on using the CBO properly.... it seems that this company is inclining to going to RBO, just because the CBO sucks... (so they say). I would be more...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.