Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Query slow via program but fast if executed in database

Former Member
0 Likes
615

We are facing a strange issue.

We have 2 custom fields in standard table and the select query has these in the Where clause.

The index is created , activated and adjusted on these 2 fields via SE14.

The query called from function module in quality runs in fraction of milli seconds.

In production it takes 90 seconds.

When we run the query directly in oracle (And also SE16) , it takes fraction of seconds .

I am trying to figure out why the program behaves differently.

We are facing a strange issue.

We have 2 custom fields in standard table and the select query has these in the Where clause.

The index is created , activated and adjusted on these 2 fields via SE14.

The query called from function module in quality runs in fraction of milli seconds.

In production it takes 90 seconds.

When we run the query directly in oracle (And also SE16) , it takes fraction of seconds .

I am trying to figure out why the program behaves differently.

1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
0 Likes
565

For all questions about database query performance, you have to run the SQL trace (transaction ST05), and analyze the execution plan. It may be analyzed by a database administrator.