Re: Dynamic SQL and Informix Online
Posted in 1998
Tim Friest wrote: > > I need to do a bunch of dynamic sql procedures... In the section > on the prepare statement in the Informix Guide to SQL Syntax book > there is a paragraph which states: > > The number of prepared objects in a single program is limited by > the available memory. This includes both statement identifiers > named in PREPARE statements and cursor declarations that > incorporate SELECT, EXECUTE PROCEDURE, or INSERT statements. > To avoid exceeding the limit, use a FREE statement to release > some statements or cursors." > > What kind of memory is this? Is this memory used by the Online > process, or space in the database, or...? Some is memory in the OnLine engine itself, and it will probably come out of the shared memory budget. Some is memory in your program. > Is it swappable? Your program memory is swappable. The shared memory is probably swappable, but it may depend on whether you've set the forced residency flag on the shared memory. > How can I tell if I'm running low? Things stop working with out of memory errors? > My program needs to create a bunch of dynamic functions and leave > them around since they will be used repeatedly. What do you mean by dynamic functions? > The only other way I can think of to do this is to dynamically > generate create procedure statements and run them... Is this a > better solution? Well, at least I understand this solution and it will work, provided that the software is resilient enough to handle multiple processes all creating (and, presumably, destroying) the procedures, or is coded to ensure that the procedures are not destroyed when they are still in use. Until I know what you mean by dynamic functions, I can't tell you whether this is the best method or not. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>