Which is faster? Cursors or Prepared statements?
Posted in 1994
I'm in the midst of reviewing an application which runs slowly and currently does not implement any locking (frustration sets in very quickly!). I want to accomplish two things: 1. Implement either COMMITTED READ isolation or CURSOR STABILITY in the main foreach loop FOR HOLD and/or FOR UPDATE cursor. 2. I would like to implement the UPDATE cursor (if it's not in the original SELECT cursor) in either a DECLARED CURSOR FOR UPDATE, or by EXECUTING a PREPARED SQL statement. I would be pleased to hear of anyone's experiences and I will summarize the information and distribute it to Kerry for the Informix FAQ. As this type of programming has been implemented throughout the system it could greatly enhance the operation of the system. Thanks in advance. Albert E. Whale aewhale@emi.lm.com ---------------------------------------------------- Sr. Systems/Database Consultant Executive's Monitor, Inc. 1789 S. Braddock Ave, Ste 220 Pittsburgh, PA 15218-1868 (412)243-4600 Fax: (412)243-4830