-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Currently odpi can not be used to fetch rows from pipelined table functions at the time they are piped.
As I found some time to investigate the issue I found that the reason is the fixed prefetch value. (At first I was unsure whether this just not works as sqlplus showed similiar behaviour.)
I would need to
- either have the prefetchSize configurable so that prefetching can be completely disabled for example in cx_Oracle
- or (what I did now to have to change only one function) a logic in dpiStmt__execute that sets the prefetchSize not higher than configurable fetchArraySize and disables prefetching for the fetch calls that follow the exec... (enable prefetch only for execute itself and limit to fetchArraySize Elias481/odpi#3)
(See below a link to gisthub with expected vs. current output, whereby expected could be changed to have "zero" wait on execute and expected wait on first fetch...)
Answer the following questions:
-
What version of ODPI-C are you using (see dpi.h)?
current (3.0.0) / master from github -
What exact command caused the problem (e.g. what command did you try to install with)? Who were you logged in as?
Trying to get rows from pipelined table function as soon as they are piped... -
What error(s) you are seeing?
https://gist.github.com/Elias481/39786d3bc0983c338cc73da414683e74 -> current.out
Note the "time to wait for row" (difference between piperow and fetched timestamp). -
What OS (and version) is your application executing on?
Linux -
What is your version of the Oracle client (e.g. Instant Client)? How was it installed? Where it is installed?
Different (11.2.0.4, 18.3.0.0, ORACLE_HOME and Instant-Client) -
What is your Oracle Database version?
Issue exists with 11.2.0.4 and 18.3.0.0 and probably all the versions between.. -
What is the
PATHenvironment variable (on Windows) orLD_LIBRARY_PATH(on Linux) set to? On macOS, what is in~/lib?
The one needed for the client I want to use... -
What environment variables did you set? How exactly did you set them?
Depends on client and setup I want to use. Either ORACLE_HOME or LD_LIBRARY_PATH or nothing at all if I use Instant-Client with ld.conf.so setup for the client and use Python ctypes to preload libclntsh.so*. Sometimes I also set NLS_LANG... How I set them depends on how I execute the Python scripts... -
What compiler version did you use?
For example gcc 4.8.5 20150623 (Red Hat 4.8.5-28)