‎2008 Mar 14 4:45 AM
Dear all
I have a doubt in Select query while using INDEXES.My index name is 'B' and in that index the field order is like
Matnr
Werks
lgort...
Suppose in my 'Where Clause' i am just giving like
where werks in s_werks and
lgort in s_lgort... i mean i am avoiding the first field of the index.
i want to know in this cause it will follow the index or it will bypass.
Please help me....
‎2008 Mar 14 4:50 AM
Hi,
No problem . It will follow the index.In where class if it is in order the performance will be more.
If in order checking of the fields will be in order .So cursor will move ahead.If disorder the cusrsor will move fornt for one field and come back for other field.So poor performance.....
‎2008 Mar 14 4:50 AM
Hi,
No problem . It will follow the index.In where class if it is in order the performance will be more.
If in order checking of the fields will be in order .So cursor will move ahead.If disorder the cusrsor will move fornt for one field and come back for other field.So poor performance.....
‎2008 Mar 14 4:56 AM
Thanks Murali.. And one more thig is, is there any change in the case of MANDT field.. I mean in the index if the first field is 'MANDT' is there any change.. please tell that also..
thanks
‎2008 Mar 14 4:59 AM
‎2008 Mar 14 5:03 AM
Hi Murali
Thanks a lot for quick reply.. But plz understand my Qn.. if the field order in the INDEX is like
MANDT
Matnr
werks... at this moment can i use
where matnr in s_matnr
and werks in s_werks...
whether it will follow the index or nor. Or it is necessary that i should write the MANDT at first to follow the index... that is my question... plz answer this also..
thanks..
‎2008 Mar 14 5:10 AM
Hi,
No need to write MANDT in where condition.Because by default selection statement will select the records of login client only you can not select the other clients.If you want to select other client data you have to write syntax in seletion statement
SELECT *
INTO table itab
FROM table name CLIENT SPECIFIED
WHERE mandt = '000'.
Pls. reward if useful.....
‎2008 Mar 14 4:53 AM
Hi,
There wont be any problem while selecting records. But, u will end up in performance error when u do code inspector check.
Reward if helpful.
Regards,
Ramya