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

Performance Improvement

Former Member
0 Likes
589

Hi Expertss,

I am having a FM that has this piece of code:

EXEC SQL.

SELECT DESCRIPTION, NUMERIC_VALUE, SHORT_COLUMN_PAGES

INTO :GS_TABLESIZE-DESCRIPTION, :GS_TABLESIZE-VALUE,

:GS_TABLESIZE-SHORT_LONG_VAL

FROM SYSDBA.PAGES

WHERE OWNER = :OWNER_NAME

AND TABLENAME = :TABLE_NAME

ENDEXEC.

It takes a lot of time to execute (abot 30 min).

I want to reduce the time of the execution.

Can you please provide me with your inputs.

Also, what does the line FROM SYSDBA.PAGES indicates? Is it that SYSDBA is a table n PAGES is a field of it?

I am asking this bcoz i m not too sure with this Native SQL thing. I will reward all the helpful answers.

Thanks,

Mohit.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
567

hi check the key fields and give all the fields possibe then u wil get good performance..

check the importance of the key fields..with this example..

select matnr

meins

from mara

into table it_mara

where matnr in s_matnr .

select mtart

pstat

matrn

from mara

into table it_mara

where mtart in s_mtart.

execute these two in the st05 and check the performance..

regards,

venakt.

4 REPLIES 4
Read only

Former Member
0 Likes
567

Hi

U should check if you're using key fields for the query

It should be the name of the dblink or database and the name of the table .

Max

Read only

abapdeveloper20
Contributor
0 Likes
567

Hi,

These might help u

The order of fields in the "WHERE" should follow the order of fields in the table.

Read only

Former Member
0 Likes
567

SYSDBA is the Oracle schema (like a database) ans PAGES is the table. I'm not sure, but this looks like a system database, and this table must have the information about all tables in the DB. Check if this command isn't inside a loop. If this single instruction is taking around 30 min, you shoudl contact Basis or the DBA administrator to check this table in Oracle, so you can analyze it and see what you can do to improve performance.

Read only

Former Member
0 Likes
568

hi check the key fields and give all the fields possibe then u wil get good performance..

check the importance of the key fields..with this example..

select matnr

meins

from mara

into table it_mara

where matnr in s_matnr .

select mtart

pstat

matrn

from mara

into table it_mara

where mtart in s_mtart.

execute these two in the st05 and check the performance..

regards,

venakt.