I'm working on a C++ application with Oracle as database and trying to fetch thousands of records with CLOB datatype.
Been searching the net on how to prefetch a CLOB datatype in OCCI but always see this "Prefetching is not in effect if LONG, LOB or Opaque Type columns (such as XMLType) are part of the query."
Is there a way in OCCI in order to prefetch CLOB or are there other alternative solutions to improve the time spent to fetch CLOB data? Thanks for the help.
There is a way to do this and we use it heavily to optimize loading tables with CLOB columns across the WAN
Instead of fetching the data as a CLOB column, convert it into a varray(16)
of varchar(32767)
select clob_to_str_array(clob_column) from table_name;
OCCI will return you a vector < std::string >
in this case. We brought down load times from 15 minutes to less than 10 seconds with this approach
I consider this one of my best optimizations ever, but I did this only because it was too late to avoid CLOB
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.