This is some extra information regarding Marco Casalino's tip on how to improve performance of a select statement....
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
It is true that performance will be improved when using the option he chooses, but it is even better to specify the field list in the SELECT statement. Just check the PREPARE operation in the SQL trace with 'Explain' and you can see why.
Report Zperformance. data: ta_bkpf_1 type standard table of bkpf. data: begin of ta_bkpf_2 occurs 0, belnr like bkpf-belnr, bukrs like bkpf-bukrs, end of ta_bkpf_2. * Execute a select three times, just to check performance. * First start SQL trace in other session, that execute this program. * Check the trace and use EXPLAIN button for PREPARE operation * (Oracle DB used) * Option 1: bad option select * from bkpf into table ta_bkpf_1 up to 100 rows. * Option 2: better option select * from bkpf into corresponding fields of table ta_bkpf_2 up to 100 rows. * Option 3: Best option select belnr bukrs from bkpf into table ta_bkpf_2 up to 100 rows.