Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Autonomous DB - PLSQL Performance FOR Loop execution time

Hi Team,

I have noticed performance issues with my plsql code. Could you please conform if it is expected time to perform below FOR loop.

FOR i IN 1..36000
LOOP
dbms_output.Put_line ('I Value: '|| i);
END LOOP;

Normal for loop with 1..36000 iterations:
Normal Loop finished in : 1.56 mins

The similar logic in java is completing in 2 seconds.

DB Version: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Please let me know if you need more details.

Thanks,

Samba

Comments
Post Details
Added on Apr 8 2024
8 comments
946 views