Re: Using Cursors in a Transaction Processing
Date: 12 Feb 2002 13:00:15 -0800
>> I'm converting a "legacy" application from ISAM-based files to an
RDBMS. Currently, parts of the application would have an "update-loop" based on the sequence of records returned via an index; records will be re-written or deleted, then the next record in the path of the index will be processed, and so on. Always within a begin-end transaction. <<
Cursors run orders of magnitude slower than pure SQL, so you wanted to avoid them for that reason alone. But the procedural languages in various products make them hard to port to a new platform, and when you are updating with them, you can lock everyone else out of the database. I have written only 5 or 6 cursors in my career and at least three of them could have been done with a CASE expression, if it has existed back then.
Without any specs, DDL or sample data, ther is no way to help you further. Do you want to try again by posting a simplified version of your problem? Received on Tue Feb 12 2002 - 22:00:15 CET