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

select query taking long time to execute during background execution.

mukeshponraj1234
Explorer
0 Likes
1,134

Hi all,

We are facing an issue while running a background job select query is used to process entry from one ztable.

but it takes longer than usual, due to which this job goes in long running.

Any possible reasons of table being locked or any other reasons for query to process for such a long duration?

SELECT zcolumns
FROM ztables UP TO 1 ROWS
INTO lwa_table
WHERE zfield1 EQ primary_key_1
AND zfield2 EQ primary_key_2
ORDER BY key_field.


Hi all,

We are facing an issue while running a background job select query is used to process entry from one ztable.

but it takes longer than usual, due to which this job goes in long running.

Any possible reasons of table being locked or any other reasons for query to process for such a long duration?

SELECT zcolumns
FROM ztables UP TO 1 ROWS
INTO lwa_table
WHERE zfield1 EQ primary_key_1
AND zfield2 EQ primary_key_2
ORDER BY key_field.


3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,061

It's impossible to do a remote analysis with so few details. You should use the tools for performance analysis, like the ones which are provided with your database system, or at SAP level (ST03, ST04, ST12, SAT, etc.)

Read only

mukeshponraj1234
Explorer
0 Likes
1,061

Hi Sandra,

We took performance trace for the following job and at the same time there is another background job which is deleting the entries of same table, not sure due to this it is causing delay in fetching from select query.

there is no issue in select query, it fetches the entries quickly while processed in foreground.

when select query can take max time for fetching while doing any operation in the same table?

Read only

ponrajasekharan
Participant
0 Likes
1,061

hi

The table modify state won't last long ..so your query should have feteched either latest modified or previous one .

Run SAT .. you find exactly where it takes more time.