AboveSoft Analyzer Report
Generated on 09/09/2005

Report for source code ZTEST

Source code : ZTEST
System : DEV
Created by : TESTUSER
Created on : 09/09/2005
Last modified by : TESTUSER
Last modified on : 09/09/2005

SQL Expression:

  SELECT
        op~aufpl 
  INTO 
        w_aufpl 
  FROM 
        afko AS gr 
          INNER JOIN afvc AS op
          ON gr~aufpl = op~aufpl 
  WHERE 
        op~steus = 'PS01' AND
        gr~aufnr = tabla_inter-grafo AND 
        op~vornr = itab-operation AND 
        op~ltxa1 = itab-den_operation AND 
        op~loekz = ' '.

Tables involved:

AFKO: Order header data PP orders
Size category : 3
Type: TRANSP
Primary key: MANDT AUFNR (can use full primary key)
Secondary index '1': MANDT AUFPL (not useful enough)
Secondary index '2': MANDT PRONR (not useful enough)
Secondary index '3': MANDT AUFNT (not useful enough)
Secondary index '4': MANDT AUFPT APLZT (not useful enough)
Secondary index '5': MANDT MAUFNR PRODNET (not useful enough)
Secondary index '6': LEAD_AUFNR (not used)
Secondary index 'D': MANDT DISPO (not useful enough)
Secondary index 'F': MANDT FEVOR (not useful enough)
Secondary index 'P': MANDT PLNTY PLNNR PLNBEZ (not useful enough)
Secondary index 'Z01': CY_SEQNR (not used)
Partial rate for this table: 10 (weighs 4)
AFVC: Operation within an order
Size category : 4
Type: TRANSP
Primary key: MANDT AUFPL APLZL (can use partial primary key)
Secondary index '1': MANDT RUECK (not useful enough)
Secondary index '2': MANDT ARBID (not useful enough)
Secondary index '3': MANDT PROJN (not useful enough)
Partial rate for this table: 7 (weighs 5)

Additional information:

Found at line: 231

8.33
weighs 9

SQL Expression:

  SELECT 
        op~aufpl 
  INTO 
        W_AUFPL 
  FROM 
        afvc AS op 
          INNER JOIN afko AS gr
          ON op~aufpl = gr~aufpl 
  WHERE 
        op~steus = 'PS01' AND
        gr~aufnr = itab-aufnr AND
        op~vornr = itab-operation AND 
        op~loekz = 'X'.

Tables involved:

AFVC: Operation within an order
Size category : 4
Type: TRANSP
Primary key: MANDT AUFPL APLZL (not useful enough)
Secondary index '1': MANDT RUECK (not useful enough)
Secondary index '2': MANDT ARBID (not useful enough)
Secondary index '3': MANDT PROJN (not useful enough)
Cannot use any index!
Partial rate for this table: 3 (weighs 5)
AFKO: Order header data PP orders
Size category : 3
Type: TRANSP
Primary key: MANDT AUFNR (can use full primary key)
Secondary index '1': MANDT AUFPL (can use full index)
Secondary index '2': MANDT PRONR (not useful enough)
Secondary index '3': MANDT AUFNT (not useful enough)
Secondary index '4': MANDT AUFPT APLZT (not useful enough)
Secondary index '5': MANDT MAUFNR PRODNET (not useful enough)
Secondary index '6': LEAD_AUFNR (not used)
Secondary index 'D': MANDT DISPO (not useful enough)
Secondary index 'F': MANDT FEVOR (not useful enough)
Secondary index 'P': MANDT PLNTY PLNNR PLNBEZ (not useful enough)
Secondary index 'Z01': CY_SEQNR (not used)
Partial rate for this table: 10 (weighs 4)

Additional information:

Found at line: 253

6.11
weighs 9

SQL Expression:

  select * from t001 where bukrs = company.

Additional information:

Found at line: 262

This SQL expression is not considered because the table is buffered.


SQL Expression:

  SELECT MAX( posnr ) INTO max_posnr FROM resb 
  WHERE aufnr = itab-aufnr AND vornr = itab-operation
  AND posnr <> space.

Tables involved:

RESB: Reservation/dependent requirements
Size category : 4
Type: TRANSP
Primary key: MANDT RSNUM RSPOS RSART (not useful enough)
Secondary index 'M': MANDT MATNR WERKS XLOEK KZEAR BDTER (not useful enough)
Secondary index 'ZGR': MANDT AUFNR VORNR (can use full index)
Partial rate for this table: 10 (weighs 5)

Additional information:

Found at line: 426

10
weighs 5

SQL Expression:

  select mblnr mjahr into corresponding fields of mat_tab
  from mkpf where xblnr = reference.

Tables involved:

MKPF: Header: Material Document
Size category : 2
Type: TRANSP
Primary key: MANDT MBLNR MJAHR (not useful enough)
Secondary index 'BUD': MANDT BUDAT MBLNR (not useful enough)
Secondary index 'ZDT': MANDT CPUDT (not useful enough)
Cannot use any index!
Partial rate for this table: 3 (weighs 3)

Additional information:

Found at line: 432

3
weighs 3

SQL Expression count: 5
Table count : 7
Line count : 539
Rate for this source code : 7.27

 

Source code count : 1

Overall rate: 7.27
SQL Expression count : 5
Line count: 539
Table count : 7

 

Scoring Interpretation for a single table (or a single table SQL expression)

10
Perfect. A full index can be used and the asterisk is not present.
8 - 9
Very good. A full index can be used but the asterisk is present. It can be improved a little by removing the asterisk.
7
Fine. Here there are two interpretations:
1) A full index can be used and the asterisk is present. Better modify to remove asterisk since it's moving a lot of data for each record it selects.
2) A partial index can be used and the asterisk is not present. You should evaluate how useful is the index that can be used.
4 - 6
Bad. Access can always be improved. Asterisk is always present and a full index cannot be used. A partial index can be used but you should evaluate how useful is it.
0 - 3
Very bad. No index can be used. Access must be improved or it may represent a problem.

The scoring of an SQL which handles more than one table is the average of each table scoring. As a general rule an SQL scoring 7 or more (green) is considered OK. You will always be able to improve SQLs scoring less than 7.