Skip to Content
author's profile photo Former Member
Former Member

Select Statement

Hi ,

It is found that Select ... into Table itab ... is better that select .... endselect.

What is the reason for it.

Regards

Arun

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2005 at 07:39 AM

    <b>select...endselect</b>, does not fetch all records at one stretch, whereas in the other case, it does fetch all the records at one stretch.

    So what ?

    Suppose to fetch a record, time taken is X, if there are 100 records it will take 100*X seconds. In the select into table, this is not the case. It will take much lesser time.

    <i>Go to SE38, in the menu select Environment, then select Performance Examples. Choose the Select ..Into Table example and measure the difference.</i>

    Regards,

    Subramanian V.

    Message was edited by: Subramanian Venkateswaran

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 13, 2005 at 07:45 AM

    When you write Select ... into Table itab the selection makes one query from database,

    however select .... endselect , queries the same statement as much as the records found.

    So there is more network load, more database load and slower program.

    -


    Please give points if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.