Tuesday, February 14, 2012

Cursors vs. Queries

One query statement is much faster than the equivalent
Cursor query.
If I am correct (and please tell me if I'm wrong) its
about 20 times faster than putting the same statement in a
cursor.
However cursors are more controllable, and better for
error checking and error recovery.
My rule of thumb.
If you can get a way with using a query then use it,
however you will need cursors to do anything complex.
J
quote:

>--Original Message--
>Can someone give me an example of when I would use a

cursor instead of a query
quote:

>.
>
> however you will need cursors to do anything complex.
Could you give an example of a problem that is too complex for a query
solution?
David Portas
--
Please reply only to the newsgroup
--

No comments:

Post a Comment