Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Performance on queries with a lot of AND / OR operators

Re: Performance on queries with a lot of AND / OR operators

From: Daniel Fink <danielwfink_at_yahoo.com>
Date: 18 Aug 2005 09:51:31 -0700
Message-ID: <1124383891.372737.253650@g47g2000cwa.googlegroups.com>


If I understand correctly, you are talking about a code generator that will prepare and send sql statements to a database. Some of the absolute worst, most unoptimizable code I have ever seen has come from code generators. In order to stand a chance at optimizing the code, the Cost-Based Optimizer (CBO) has to be given something decent to start with. Then it does a pretty good job (usually, but not always).

To answer your questions directly, yes, it is likely to have a very bad impact on peformance.

To move forward, you need to
1) Learn everything you can about how Oracle processes sql, including how the CBO works (and what it cannot do). 2) Structure your data to support these types of queries. It probably means a lot of denormalization, but that may be the only way to help.

Regards,
Dan Fink Received on Thu Aug 18 2005 - 11:51:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US