Skip to Content
author's profile photo Former Member
Former Member

Access to PCL2 and EDIDC

Hi,

There are 2 top stataments sorted by diskreads/buffer gets .

First one involves table PCL2. The estimated cost is also very LOW .i.e 1. I checked the number of records of PCL2 which is

11,270,318. And the where clause also looks correct.Please help me tuning this further as it is in top because of more number of executions.

1 . SELECT

*i

FROM

"PCL2"

WHERE

"CLIENT" = :A0 AND "RELID" = :A1 AND "SRTFD" = :A2

ORDER BY

"CLIENT" , "RELID" , "SRTFD" , "SRTF2"#

SELECT STATEMENT ( Estimated Costs = 1 , Estimated #Rows = 0 )

2 TABLE ACCESS BY INDEX ROWID PCL2

( Estim. Costs = 1 , Estim. #Rows = 1 )

Estim. CPU-Costs = 5,807 Estim. IO-Costs = 1

1 INDEX RANGE SCAN PCL2~0

( Estim. Costs = 1 , Estim. #Rows = 1 )

Search Columns: 3

Estim. CPU-Costs = 4,313 Estim. IO-Costs = 1

Access Predicates

Secondly there is second table is EDIDC. Which is having full table scan as below and other one is not.

2. a) SELECT

MAX( "DOCNUM" )

FROM

"EDIDC"

WHERE

"MANDT" = :A0 AND "CREDAT" = :A1#

SELECT STATEMENT ( Estimated Costs = 185,530 , Estimated #Rows = 0 )

2 SORT AGGREGATE

1 TABLE ACCESS FULL EDIDC

( Estim. Costs = 185,529 , Estim. #Rows = 37,324 )

Estim. CPU-Costs = 23,046,543,943 Estim. IO-Costs = 183,909

Filter Predicates

2 . b)

SELECT

"MANDT" , "DOCNUM" , "STATUS" , "UPDDAT" , "UPDTIM"

FROM

"EDIDC"

WHERE

"MANDT" = :A0 AND "UPDDAT" > :A1 AND "DIRECT" = :A2 AND "STATUS" IN ( :A3 , :A4 , :A5 , :A6 , :A7

, :A8 , :A9 , :A10 , :A11 , :A12 ) AND "MESTYP" = :A13#

SELECT STATEMENT ( Estimated Costs = 2,472 , Estimated #Rows = 0 )

2 TABLE ACCESS BY INDEX ROWID EDIDC

( Estim. Costs = 2,471 , Estim. #Rows = 5,503 )

Estim. CPU-Costs = 85,696,313 Estim. IO-Costs = 2,465

Filter Predicates

1 INDEX RANGE SCAN EDIDC~3

( Estim. Costs = 72 , Estim. #Rows = 220,127 )

Search Columns: 2

Estim. CPU-Costs = 10,598,382 Estim. IO-Costs = 71

Access Predicates

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on May 04, 2011 at 12:29 PM

    1) for PCL2, do you use a SELECT statement directly on table or do you use an IMPORT statement in order to read the cluster ?

    2) don't use MAX(docnum) but SELECT UP TO 1 ROWS ORDER BY docnum DESCENDING. The MAX bypasses the request optimizer.

    Add a comment
    10|10000 characters needed characters exceeded

    • 1) for PCL2, do you use a SELECT statement directly on table or do you use an IMPORT statement in order to read the cluster ?

      >

      >

      > 2) don't use MAX(docnum) but SELECT UP TO 1 ROWS ORDER BY docnum DESCENDING. The MAX bypasses the request optimizer.

      1) using SELECT on a cluster table normally makes no sense. The access is optimal, the only way to optimize is to reduce the number of executions.

      2) There is no index on EDIDC with field CREDAT. I guess your advice is not going to help. He definitely either needs an index with MANDT, CREDAT, DOCNUM fields or check with the developer of the SELECT if another field UPDDAT can be used instead.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.