01-11-2006 2:00 AM
hello experts, how can I implement index in my SQL Statements? can anyone provide simple code snippets... thank you very much in advance...
01-11-2006 2:29 AM
if the table you are using has an index you can try and get sql to use it by coding the fields of the index in the where clause of your select (in the same sequence as they appear in the index). Use ST05 to explain your sql if you can and this should confirm/deny whether your code uses an index or not.
01-11-2006 2:04 AM
Do you want to use a particular index? For that you would have to use HINTS. Or do you just want to make sure that your select is using an index effectively?
Rob
01-11-2006 2:07 AM
01-11-2006 2:10 AM
sir, i have lots of query in my ABAP program, and the program terminates because of timeout (maybe there is a time limit in the processing of SQL statements), Ive filtered my SQL alot, I even avoided innerjoins, the solution I think is maybe Indexing will help. thanks
01-11-2006 2:12 AM
There is a time limit, but not on SELECT statements, the limit is on overall runtime. This is a global system setting. Using indexes can help the performance of the select statements, but could also decrease the performance when updating the TABLE that the index has been applied to. Can you please post your code, maybe we can make some suggestions.
Regards,
Rich Heilman
01-11-2006 2:14 AM
Well we really need to see the select that's causing the problem. In this case you want o make sure your using an index effectively. So you won't want to use hints.
Rob
01-11-2006 2:29 AM
if the table you are using has an index you can try and get sql to use it by coding the fields of the index in the where clause of your select (in the same sequence as they appear in the index). Use ST05 to explain your sql if you can and this should confirm/deny whether your code uses an index or not.