Skip to Content
-1
Former Member
Jan 27, 2016 at 02:10 AM

Performance issue with table access-BSEG

660 Views

Hi,

I have written below the select query.

REFRESH i_bseg.

SELECT * from bseg INTO TABLE i_bseg

WHERE bukrs = i_parct-bukrs

AND belnr <> i_parct-belnr

AND augbl = i_parct-belnr

AND auggj = i_parct-gjahr.

CHECK NOT i_bseg[] IS INITIAL.

SELECT * from bseg APPENDING TABLE i_bseg

WHERE bukrs = i_parct-bukrs

AND belnr = i_parct-belnr

and gjahr = i_parct-gjahr

AND augbl = SPACE.

If I run the report then the first select is taking too much time, I understand since its and cluster table so backend RFBLG~0 will be used. Please find below the execution plan for the query.

2 TABLE ACCESS BY INDEX ROWID RFBLG

( Estim. Costs = 262.205 , Estim. #Rows = 317.601 )

Estim. CPU-Costs = 2.035.079.874 Estim. IO-Costs = 261.961

1 INDEX RANGE SCAN RFBLG~0

( Estim. Costs = 2.385 , Estim. #Rows = 317.601 )

Search Columns: 2

Estim. CPU-Costs = 95.504.949 Estim. IO-Costs = 2.374

Access Predicates Filter Predicates

I tried with many forums and table BSIS can be used...can we create index on BSIS(BUKRS, AUGBL and GJAHR) and select the BELNR again use for all entries in BSEG?

Please advise.

Regards,

A Vadamalai