Dynamically allocate a buffer for a database query according to the actual record size

I am using Perl 5.8.3 script to query Oracle 11g database. Connection established with Win32 ODBC extension:

http://search.cpan.org/~gsar/libwin32-0.191/ODBC/ODBC.pm

As you can see in the documentation (link), the buffer size is limited to 10K. This buffer size is in some cases insufficient (ie, too small).

  • Excerpt from the above link: "The amount of memory that is allocated to receive field record data is dynamic and changes when it needs to be larger." I tested it and the buffer size doesn't grow with big data. These are just mistakes. Is there any configuration / setting / initialization / parameters I need to do? Am I missing something here?
  • What is the lifetime of the allocated buffer? Is this for the entire time of an open connection?
  • I can increase the buffer size with SetMaxBuffer up to 2GB. But to what size? Having too much can lead to server stability. One option is to get the row length (actual byte size for all columns to write, not average) so that we can dynamically allocate enough buffer size. Is there an easy way to do this, or should I count the sum of all columns? This option will increase the DB trips, but in this particular case it is not a problem. Related: Oracle - How to get the actual size of a specific ROW? http://www.dba-oracle.com/t_get_length_of_row.htm

Thanks in advance!

+1
database oracle perl odbc buffer


source to share


No one has answered this question yet

See similar questions:

eleven
Oracle - How to get the actual size of a particular ROW?
3
DBD :: ODBC vs win32 :: odbc

or similar:

1256
What are the options for storing hierarchical data in a relational database?
438
Elasticsearch query to return all records
4
SQLException: The assigned column value was truncated while executing while (rs.getNext ())
4
Is it possible to dynamically buffer the size when retrieving varchar2 column values?
2
C ++ predetermines VARCHAR length using associated ODBC parameters
2
Find all database records where the data length of the characters in the column is greater than X
0
Sql server database size grows very fast
0
Script Oracle Tables (DDL) with statements to insert data into single / multiple sql files
0
Increase the OUT BIND size in the node oracle. NJS-016: buffer too small for OUT links in Error (native)
0
Memory error when starting VBA



All Articles
Loading...
X
Show
Funny
Dev
Pics