Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2. Transfer small amount of data to internal table (i.e., if you want to use few
fields from the database table use SELECT with fields not to use SELECT *).
3. If you use views, the SAP buffering is switched off.
4. You should use aggregate functions rather than selecting data and grouping it
yourself. SAP buffering will be switched off if you use aggregate functions.
5. Use a small number of database access. You can use a nested select
statement when the outermost level is small. Otherwise it is better to avoid nested
a select statement. Sometimes you only want to know if certain records in the
second table exist or not. You do not want actual content. In this case you can
use a nested select statement. For example:
SELECT carrid connid INTO (xcarrid, xconnid) FROM sflight AS f WHERE NOT
EXISTS (SELECT * FROM spfli WHERE carrid = f~carrid AND connid = f~connid
).
6. Use SELECT FOR ALL ENTRIES.
7. Create secondary indexes it will vastly improve the data base selection and
slow down the data base insertion and updation.
8. some times full table scan is faster. The optimizer should do it right.
9. APPLY HAVING clause if it necessary.
19. You should check whether you can delete duplicates using the DELETE
ADJACENT DUPLICATES FROM itab. instead of using SELECT DISTINCT
20. To start the Performance Trace, choose Test Performance Trace from the
initial screen of the ABAP Workbench (Transaction ST05).