Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP&SQL Performance

former_member205645
Participant
0 Kudos

Hello Gurus,

I have to update two Z tables from an excel file that contains 1,6 milion rows. The tables on the DB have about 30 milion rows.

I only have to update one or two columns out of 98.

The loading of the file is done and working well BUT ... in order to use UPDATE dbtab FROM itab I have to read the 1,6 milion rows. While using FOR ALL ENTRIES IN the Open-Sql generates about 1 SELECT for each ROW, which is very very bad. Also a I tried to use OPEN CURSOR and only read 5000 rows and it took about 5 min. ... very slow. i have checked all the keys and also sorted the tables.

What do you guys think? Should I write a UPDATE in a LOOP or use the SELECT ... UP TO ROWS ... FOR ALL ENTRIES and then UPDATE dbtab FROM itab.

As this is a report that will only run once I don't think I should parallelize it.

Thanks,

Ioan.

3 REPLIES 3

thangam_perumal
Contributor
0 Kudos

Hi Loan,

             Please try to use Modify statement with in loop.

Regards,

    Thangam.P

former_member205645
Participant
0 Kudos

The table after FOR ALL ENTRIES IN is way too big this is a problem(1,6 milion). I will try different sizes.

0 Kudos

It works with table size 650.000 after FOR ALL ENTRIES IN. That was the problem.