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: SQL performance on index?

Re: SQL performance on index?

From: hpuxrac <johnbhurley_at_sbcglobal.net>
Date: 11 Jun 2006 09:07:38 -0700
Message-ID: <1150042058.105299.213170@f6g2000cwb.googlegroups.com>

James Yang wrote:
> We found an expensive SQL on our SAP R/3 system:
>
> SELECT
> "AUFPL" , "OBJNR" , "APLFL"
> FROM
> "AFVC"
> WHERE
> "MANDT" = :A0 AND "ARBID" IN ( :A1 , :A2 )#
>
> AUFPL is key for table AFVC. ARBID is defined as an index already.
> OBJNR & APLFL are not defined in any index. Field MANDY & ARBID are
> low-cardinality, but AUFPL is high-cardinality.
>
> If I create a new index which include all those fields (MANDT, ARBID,
> AUFPL, OBJNR, APLFL), will it improve the performance?

First hopefully you have a good test system that can be used for any experimenting.

You might want an index with multiple columns in it. Often SQL performance problems like this involve creating an index with all the columns in the WHERE clause.

Occassionally, it does pay off to have all the column in a query, including the ones in the WHERE clause, in an index. Received on Sun Jun 11 2006 - 11:07:38 CDT

Original text of this message

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