cancel
Showing results for 
Search instead for 
Did you mean: 

query

Former Member
0 Kudos

Hi All

the below query is taking too much time in system. Can you suggest any solution.

SELECT

"VKONT"

FROM

"DFKKOP"

WHERE

"MANDT" = :A0 AND "AUGST" = :A1 AND "VKONT" IN ( :A2 , :A3 , :A4 , :A5 , :A6 ) AND "BUKRS" = :A7

AND "STAKZ" = :A8 AND "HVORG" = :A9 AND "TVORG" = :A10 AND "FAEDN" > :A11 AND NOT "AUGRD" IN (

:A12 , :A13 )#

Execution Plan

Explain from v$sql_plan: Address: 00000004D9EC3B08 Hash_value: 32710645 Child_number: 0

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

3 INLIST ITERATOR

2 TABLE ACCESS BY INDEX ROWID DFKKOP

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

1 INDEX RANGE SCAN DFKKOP~4

( Estim. Costs = 4 , Estim. #Rows = 75 )

Search Columns: 4

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Do you have an index appropriate for your where clause?

MANDT, AUGST, VKONT, BUKRS, STAKZ, HVORG, TVORG, FAEDN, AUGRD

Former Member
0 Kudos

MANDT

AUGST

VKONT

BUKRS

AUGDT

______________________________

I have an index on the above. it is being used for the query.

Do you thing it is causing a problem.

Former Member
0 Kudos

Since the WHERE clause in yoru query contains more fields than the index, it looks like it may not be performing optimally.

Typically you want to have an index that includes all fields that are in the WHERE clause.

Former Member
0 Kudos

Were you able to solve your issue?