‎2007 Nov 07 12:26 PM
Hello Experts,
I have one issue i am delete the entries from Standard table.
The code i have written is
Delete from <Standard Table> where Field name = parameter_name
commit work
It is going through Full table scan.
If i want to improve the performance for this simple report then what should i have to change
Can you please suggest me in this case
You can mail me at mr.abaper@gmail.com or msameerahmed09@gmail.com
Your help is appreciated
Thanks in advance
‎2007 Nov 07 10:17 PM
Take a look at the primary key of the table as well as any existing index. You want to use as many fields of the primary key / index to avoid the full table scan.
In case there is no suitable index for the table that matches your requirements you might want to look into the option of creating an index that can be used by your delete statement.
However keep in mind that any index added to a table will increase the access time to that table in case of a change because in addition to the data update the index needs to be updated as well therefore you don't want to add too many index to a table.
Hope that helps,
Michael
‎2007 Nov 08 7:34 AM
First you should check how many lines will be deleted, if more than 10% of the total, then no index will be taken and it is actually better that no index is taken.
If not that many, then an index could help. If you need the statement not regularly,then you could even create an index temporarily, and delete it afterwards.
Siegfried