Re: 4gl questions :
Posted in 1997
johnl@informix.com (Jonathan Leffler) wrote: :On 2 Oct 1997, Belakimem wrote: ...snip... :> Q2. Is there any harm in not closing open cursors, just reopening every time :> they are needed? : :It depends on whether the code will ever need to work against a MODE ANSI :database. If not, then it isn't critical, but it is a good idea to close :the cursor when you finish with it (and FREE it if you won't use it very :often); this cuts down on the memory needed in the engine. : :Yours, :Jonathan Leffler (johnl@informix.com) #include <witticism.h> We have found two more issues: 1. If you do need the cursor very often it used to be faster to not close it, just do another open and fetch. I haven't realy tested this on 7.x OnLine though. 2. If the database is without logging (where this issue is is most acute as commit work would otherwise close all cursors not declared with hold) we have found some locking problems caused by open cursors. Some kind of locks seem not to be released in some cases until the cursor is closed. This issue is still under investigation, so I don't know any more details now. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org