cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching Process is very slow

Former Member
0 Kudos

Dear All,

SD and FI users are using VA01 tx and when they give Condition Type then it's taking 12 to 15 minutes even 20 minuts.

while i traced out the problem with ST05 and time is being consumed during data fetching from VBFA table.

while trace is:

149996661 VBFA FETCH   0   1403

how can i overcome on this issue?

Regards,

Diya

Accepted Solutions (0)

Answers (1)

Answers (1)

xymanuel
Active Participant
0 Kudos

Hi Diya,

in the st05 trace, mark the row and click "explain".

The trick now, is to find out, which indexe, the SQL statement uses.

I use "text explain".

There you have to look for the "where" restrictions in this statement.

The clustered Index of table VBFA is MANDT, VBELV, POSNV, VBELN, POSNN, VBTYP_N.

To get an fast return, the statement should use the columns in the index, in this same order.

e.g.

if the where statment is kind of:

WHERE "MANDT" = @P0 AND "VBELV" = @P1 AND "VBELN" = @P3

the SQL optimizer can use MANDT and VBELV, because they are on the first and second position.

The third value VBELN, cannot be used by the optimizer to narrow the output, because the next column is POSNV.

In the "text explain" you will find a row like this:

SELECT

|--Clustered Index Seek(OBJECT:([SID].[xxx].[VBFA].[VBFA~0]), SEEK:([VBFA].

Here you see, which index the optimizer is using. Here it is VBFA~0.

The solution for my example above may be to create a new index with the following columns in this order:

VBFA~Z01: MANDT, VBELV, VBELN.

But, do not create indexes whithout searching for notes, regarding slow statments on VBFA. There are a lot!

You say it is in the standard transaction VA01. I think there is no own coding?

Check it, which ABAP Statement it is.

In ST05, mark the row, and press Button "ABAP Coding" to find out, which programm it is. If it is a standard SAP Programm, also try to search for notes reardging this problem.

Kind regards

Manuel.

Edited by: Manuel Herr on Apr 11, 2011 9:42 AM

also use this!

Former Member
0 Kudos

Dear Manuel,

sorry for late reply...thx for your kind reply,

I got the trace against VA01, please have a look and guide me.

188

ZSOT

FETCH

0

1403

2

ZSOT

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "AUART" = 'ZCR' AND "TCODE" = 'VA01' AND "FLG" = '1'

178

ZSOT

FETCH

0

1403

6

VBFA

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "VBELN" = ' ' AND ROWNUM <= 1

105436699

VBFA

FETCH

0

1403

5

VBAK

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "VBELN" = ' '

9,562

VBAK

FETCH

0

1403

2

QMEL

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "AUFNR" = ' ' AND ROWNUM <= 1

21,947

QMEL

FETCH

1

0

2

VBFA

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "VBELN" = ' ' AND ROWNUM <= 1

105492830

VBFA

FETCH

0

1403

4

VBAK

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "VBELN" = ' '

9,483

VBAK

FETCH

0

1403

3

QMEL

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "AUFNR" = ' ' AND ROWNUM <= 1

21,735

QMEL

FETCH

1

0

2

VBFA

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "VBELN" = ' ' AND ROWNUM <= 1

104273528

VBFA

FETCH

0

1403

4

VBAK

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "VBELN" = ' '

13,349

VBAK

FETCH

0

1403

2

QMEL

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "AUFNR" = ' ' AND ROWNUM <= 1

21,569

QMEL

FETCH

1

0

2

VBFA

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "VBELN" = ' ' AND ROWNUM <= 1

104541784

VBFA

FETCH

0

1403

4

VBAK

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "VBELN" = ' '

13,238

VBAK

FETCH

0

1403

3

QMEL

REOPEN

0

SELECT WHERE "MANDT" = '600' AND "AUFNR" = ' ' AND ROWNUM <= 1

21,369

QMEL

FETCH

1

0

2

DDNTT

REOPEN

0

SELECT WHERE TABNAME = 'T685T'

Regards,

Former Member
0 Kudos

Hi,

Manuel explained you very clearly how to catch fish, don't ask him now to be spoon fed...

In other words, don't ask forum people to do your own work...

Regards,

Olivier