Re: Stored procedures and esql/c
Posted in 1997
In article <01bc2355$4e77d600$27fc989e@pkj-client1>, Peter Jones <pete@pkjones0.demon.co.uk> writes >I have been asked to write an application in ESQL/C which is called >from a stored procedure. I am experiencing performance problems >because the program has to connect to the database each time it's >called as well as perform a load of PREPARE's, etc. > >I've experimented a little with an intermediate process which manages >signaling to a second (main) process. This has turned out to rather >cumbersome as it has to deal with simultaneous calls. The program >also accepts parameters from the stored procedure, and the stored >procedure in turn must wait for the C program to complete. > >Any ideas ? > >[ HPUX 10 + Informix 7.2 ] > >Pete Try write a server which wakes up every minute or so and looks in a table for the work to do i.e. create a database table which contains requests to the server. the server process selects the parameters from the table (which should have a serial field on it so that each requests can has a unique identifier. PS Use row level locking on the table and have the server process use lock mode wait. This also resolves the problems with simultaneous calls - as long as the clients processes which make requests use lock mode wait as well whilst inserting into the requests table. -- David Williams