Application Development 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: 

Peformance problem with PRPS table

Former Member
0 Kudos

I have appended a field (ZREFWBS) to the PRPS table and I am using the below quey to get the single record.

SELECT posid

psphi

FROM prps

INTO (v_pspnr,

v_psphi)

UP TO 1 ROWS

WHERE zzrefwbs = ci_prps-zzrefwbs.

ENDSELECT.

It is taking almost 5 to 10 mins to execute.

Please suggest.

Thanks in Advance.

Moderator message - moved to correct forum

Edited by: Rob Burbank on Apr 23, 2009 2:02 PM

7 REPLIES 7

Former Member
0 Kudos

First thing rather than using select upto 1 rows use select single

Second dont use select endselect.

Finally if both does not help then

What you can do is add the field zzrefwbs as the secondary field of the table.

Before doing that just check where used list for the table.

Regards,

Lalit Mohan Gupta.

0 Kudos

>

> First thing rather than using select upto 1 rows use select single

Really - how does that help?

Rob

0 Kudos

Select Single * will pickup only one matching record from the database into the buffer, and returns the same to the internal table.

Select upto 1 rows will pickup all the records matching the condition into the buffer, but return the top record to the internal table.

Regards,

Lalit Mohan Gupta.

Former Member
0 Kudos

Hi guys,

we need to pick only single record and there is would be not any loop between select and endselect.

Please suggest.

0 Kudos

>

> Hi guys,

>

> we need to pick only single record and there is would be not any loop between select and endselect.

>

> Please suggest.

I think the best solution in this case is to simply run the program in the background. Not all programs can be easily tuned without causing problems elsewhere.

Rob

former_member194613
Active Contributor
0 Kudos

> Select Single * will pickup only one matching record from the database into the buffer, and returns the > same to the internal table.

>

> Select upto 1 rows will pickup all the records matching the condition into the buffer, but return the top > record to the internal table.

nonsense ... SELECT SINGLE and UP TO 1 ROWS are 100% identical

and buffers is something completely different, there is also not internal involved in that statement.

*About the question, you a field to the table ... how should it be in any index ????? *

by automatic index creation or what ???

No index => no performance, very simple.

Siegfried

Former Member
0 Kudos

thanks