In a PL/SQL block,which loop type should be used in a performance point of view & Why (as both loops can do the same task)
1) open - Fetch loop
2) for loop

Answer Posted / mihir kar

For loop is always faster than explicitly open -fetch loop.
the main advantages of for loop is it internally works like bulk collect limit 100
it hold 100 record and fetch so it is always preferebale.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Show code of a cursor for loop.

771


What are the two virtual tables available at the time of database trigger execution?

878


How would you pass hints to the sql processor?

704


What is sql in oracle?

793


What is varray in pl sql?

762






What is synchronized subquery?

824


Is join an inner join?

718


What will you get by the cursor attribute sql%notfound?

777


What is the difference between in and between in sql?

773


How do I write a sql query in pgadmin 4?

712


How do I view a procedure in sql?

723


what is acid property in database? : Sql dba

746


What are the possible values that can be stored in a boolean data field?

717


How much does sqlite cost?

724


which command using query analyzer will give you the version of sql server and operating system? : Sql dba

704