Skip to Content
0
Former Member
Apr 25, 2013 at 09:11 AM

program executing for more than 28 hours in quality

30 Views

Hi,

As part of a job a program is running for more than 28 hours in quality but executing in 20 mins in production.

It is observed that in the program the select query on A902 table is taking long time for execution.

When I checked the SQL trace for this query in production it is using the index YRA.While in quality

the same select query is using the index YVL.

Please find below the select query and the indices.

SELECT
a~kschl
a~matnr
a~datbi
a~datab
a~knumh
FROM a902 AS a
INNER JOIN konp AS b
ON a~knumh EQ b~knumh
INTO TABLE gt_a902
FOR ALL ENTRIES IN gt_mara
WHERE
a~kappl EQ lc_kappl AND
a~kschl IN gr_kschl AND
a~vkorg EQ s_org AND
a~vtweg EQ p_vtweg AND
a~spart EQ p_spart AND
a~matnr = gt_mara-matnr
AND a~datab LE gv_run_date
AND a~datbi GE gv_run_date
* AND b~loevm_ko EQ space.

AND b~loevm_ko EQ space

%_HINTS ORACLE 'INDEX("A902" "A902~YRA")'.

Even I tried using index YRA through HINTS.But still the program is executing for long time.

Please find attached the document showing the indeces used in production and quality.

Please let me know what would be the reason for long execution in quality.

Regards,

Swapna