cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with table index

0 Kudos

Hi All, Hope you are all well.

Strange issue here:

We have a Custom ABAP program that reads from mainly Table EKKO.

On My QAS system the program works 100%, when i do a SQL Trace (ST05) i can see in the execution plan that it is using the correct index on the Date field.

On MY Production system the very same program just runs and runs and eventually times out, in the sql Trace the execution plan shows that the index is not being used thus the long run time.

Here is the Catch: the ABAP people have looked at the program intensely and have found no problems, my QAS system is a copy of Pruduction (Syetem copy). Program runs no problem on QAS but times out on Production.

It seems that on Production the Program is not using the Index to search the table.

Please help

Regards

Andre

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Is this about a single-table statement or a join/join-view?

Have you checked whether the index is actually there and usabke (NOT BAD and NOT DISABLED)?

regards,

Lars

0 Kudos

Hi Lars

Yes i have checked the table and all indexes are active, i even reactivated the indexes on Production

If i Query the table directly SE16 using the same fields as in the ABAP it returns the results no problem.

The program does have joins onto other tables.

I am going to do a update stat after hours tonight and will see if that helps.

How can i verify that all relationships to other tables are operational.

Regards

Andre

lbreddemann
Active Contributor
0 Kudos

>Yes i have checked the table and all indexes are active, i even reactivated the indexes on Production

Ok.

>If i Query the table directly SE16 using the same fields as in the ABAP it returns the results no problem.

Ok.

>The program does have joins onto other tables.

And you checked this via SE16? Don't think so...

>I am going to do a update stat after hours tonight and will see if that helps.

Yep - good idea. I'd bet that your statement will take the index as soon as the statistics for all involved tables have been collected.

>How can i verify that all relationships to other tables are operational.

?? What is that supposed to mean?

Have you ever seen any foreign key constraints in SAP databases?

Would they even make sense there?

NO!

So which "relationships" do you think could be "non-operational" ???

regards,

Lars

0 Kudos

Hi Lars

No i did not mean i checked the joins via se16

I meant that when run se16 on table ekko it works 100%

In the sql select code for the program it has joins to other tables.

I will run the update stat tonight and see how it goes

0 Kudos

Thnnks

Did a update stats on all tables and problem is solved