Threading in Informix 4GL
Posted in 2012
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Java & JDBC Development
Hi, in the context of: Informix 4GL 7.50 Without C/Java procedures. Without RUN external program. Can i EXECUTE a prepared statement (an insert) whitout waiting for the result or the error, like doing it in other thread. There is an insert in a table for statistic/logging pourpouses and in the exceptional case of long transaction or logs space probles blocks all programs, the idea is to send the insert but not wait for response/error/timeout. I know i can put in an external program and do a RUN NOWAIT but this add unnecesary complexity of an external program/script and command line parameters errors. Thanks! Enrique.
On Fri, Jun 15, 2012 at 11:32 AM, eferreyra <eferreyra@gmail.com> wrote: > Hi, in the context of: > > Informix 4GL 7.50 > Without C/Java procedures. > Without RUN external program. > > Can I EXECUTE a prepared statement (an insert) without waiting for the > result or the error, like doing it in other thread. > No. ESQL/C has no support for asynchronous SQL execution, and I4GL is built on top of ESQL/C. Don't even think of trying to add threads to an I4GL program. > There is an insert in a table for statistic/logging purposes and in the > exceptional case of long transaction or logs space problems blocks all > programs, the idea is to send the insert but not wait for > response/error/timeout. > How often does the exceptional occur? > I know I can put in an external program and do a RUN NOWAIT but this add > unnecessary complexity of an external program/script and command line > parameters errors. > This may be your best shot. -- Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h> Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org "Blessed are we who can laugh at ourselves, for we shall never cease to be amused."
--> There is an insert in a table for statistic/logging pourpouses and in the exceptional case of long transaction or logs space probles blocks all programs, the idea -->is to send the insert but not wait for response/error/timeout. i would try and minimize that by setting LTXHWM = 10 or 20 and LTXEHWM = 60..... For backing up logs i would configure enough space so that it will not become an issue. It helps if your database takes a few days before it is rotated so you have the time and opertunity to so something manually when needed during the day. Downside is that having a lot of log space makes clearing logs during restores take longer. I guess JL has answered the rest... Superboer. On 15 jun, 20:32, eferreyra <eferre...@gmail.com> wrote: > Hi, in the context of: > > Informix 4GL 7.50 > Without C/Java procedures. > Without RUN external program. > > Can i EXECUTE a prepared statement (an insert) whitout waiting for the result or the error, like doing it in other thread. > > There is an insert in a table for statistic/logging pourpouses and in the exceptional case of long transaction or logs space probles blocks all programs, the idea is to send the insert but not wait for response/error/timeout. > > I know i can put in an external program and do a RUN NOWAIT but this add unnecesary complexity of an external program/script and command line parameters errors. > > Thanks! > Enrique.
Have negotiated with DBA and for now i convinced him to solve (or workaround) the problem of the long transaction issue (some bug with BTS indexes) instead of throwing that logic in a RUN. Thnks to both of you. Enrique