Re: Stored procedures and multiple record set returns
Posted in 1998
Jacob Salomon wrote: > Sighhh.... I have seen many features touted as "cool" turn ugly upon > some basic analysis. Some cool features Informix truly lacks (like an > array of structure variables to be returned in one swoop) and they Jake, ESQL has had a FETCH_ARRAY feature, non-documented of course, since 7.10. The library provides an extern long FetArrSize which you can set to the number of rows to FETCH into the array each time the FETCH is executed with the number of rows actually returned stored in sqlca.sqlerrd[2]. For best results you would also take advantage of the FetBufSize feature to set the size of the communication buffer large enough to hold FetArrSize rows to minimize the network traffic as much as possible. Since 1024 <= FetBufSize <= 32000 you can set FetArrSize = FetBufSize / RowSize where RowSize is know or determined from a DESCRIBE statement. Ming Chien reports that the feature improves performance most for tables containing BLOBs (and presumable any large row table) but the decrease in network traffic for smaller row tables could be even more significant in increasing throughput in a busy client-server environment. OK, this really returns a structure of arrays (one per column) so maybe you are correct, but it is not hard to initialize an array of structures containing pointers into the column arrays and keep going. Art S. Kagel