Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Array fetching in Pro*C
Hi,
We are writing an interface to load data from remote database tables to local tables. From remote tables to local, it goes through SQL*NET. So we are trying to do it in a way of best performanence by using host array in Pro*C. However we don't like to use fixed array size for two reasons: 1) It is hard to tune at the time of installation; 2) Waste too much memory just to hold these big trunck of data.
If we use dynamic memory allocation, we have to do malloc for each individual element array since Oracle Pro*C precompiler does not take array of structures like this:
#typedef struct _foo { elmt_1; elmt_2; ... } foo; foo Array[size];
Being unable to do this will force us to treat each element individually. This not only makes the programming dreadful with so much mallocs and frees, but also could potentially slow down the process. Neither seems good choice to use.
We are using Oracle 7.1.6 and Pro*C 2.2.
Thanks in advance!
Best Regards
Ye Sun, Ph.D.
Department of Physics and Astronomy
University of Southern California
Los Angeles, CA 90089-0484
e-mail: ysun_at_usc.edu
Received on Wed Feb 26 1997 - 00:00:00 CST