What are the disadvantages of cursors? How can you avoid
cursors?

Answers were Sorted based on User's Feedback



What are the disadvantages of cursors? How can you avoid cursors?..

Answer / rahul kumar

A) In cursors each time you fetch a new row it does a round
trip with the database thereby increase network use and time.

B) There is also restriction on select statements that can be
used in cursors

C) It also uses more resources and temporary memory

Cursors can be avoided with the help of careful
implementation of while loop and other set based operations

Is This Answer Correct ?    13 Yes 2 No

What are the disadvantages of cursors? How can you avoid cursors?..

Answer / gogune s k

Overload for RAM to process each row and time consuming.
Bulk collect can be used in place of cursors in some cases.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More DB Development Interview Questions

How you can make a parameterized view?

0 Answers  


How is data stored in dbms?

0 Answers  


Pgm A calls Pgm B and pgm B uses cursor, when pgm B is called second time, the program is abending saying the cursor is opened? Why?

0 Answers   IBM,


1. Using the XML Document below, with the URI “recipe.xml” define the following queries in XQuery: a.) Give the names of all breakfast in the menu. b.) Select breakfasts that have price lower than $7.00? <?xml version="1.0"?> <breakfast_menu> <food> <name>Belgian Waffles</name> <price>$5.95</price> <description> two of our famous Belgian Waffles with plenty of real maple syrup </description> <calories>650</calories> </food> <food> <name>Strawberry Belgian Waffles</name> <price>$7.95</price> <description> light Belgian waffles covered with strawberries and whipped cream </description> <calories>900</calories> </food> <food> <name>Berry-Berry Belgian Waffles</name> <price>$8.95</price> <description> light Belgian waffles covered with an assortment of fresh berries and whipped cream </description> <calories>900</calories> </food> <food> <name>French Toast</name> <price>$4.50</price> <description> thick slices made from our homemade sourdough bread </description> <calories>600</calories> </food> <food> <name>Homestyle Breakfast</name> <price>$6.95</price> <description> two eggs, bacon or sausage, toast, and our ever-popular hash browns </description> <calories>950</calories> </food> </breakfast_menu>

0 Answers  


Which data type cannot be used as a parameter in a udf?

0 Answers  






How to replace not in with not exist?

0 Answers  


Explain about a primary key?

0 Answers  


Explain the general syntax for a SELECT statements covering all the options.

3 Answers  


I HAVE A PI ON COL A THE NEXT DAY I WANT CHANGE THE PI ON COL B? PLS SEND ME THE ANS

0 Answers   IBM,


how to find the first two highest salaries in deptno in emp table

2 Answers  


Can an extended stored procedure be called from inside a user-defined function?

0 Answers  


What are the three basic rules which are to be followed for the relational model of the database?

0 Answers  


Categories