A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/oracle/python-oracledb/issues/14 below:

`LOB.getchunksize()` not supported in thin mode · Issue #14 · oracle/python-oracledb · GitHub

The following Python script

import oracledb

db = oracledb.connect("user/pwd@db", config_dir=os.environ["ORACLE_HOME"] + "/network/admin")
lob = db.cursor().execute("select to_clob('foo') from dual").fetchone()[0]
lob.getchunksize()

gives the following stacktrace:

Traceback (most recent call last):
  File "/Users/walter/oracledb_bug.py", line 6, in <module>
    lob.getchunksize()
  File "/Users/walter/pyvenvs/default/lib/python3.10/site-packages/oracledb/lob.py", line 75, in getchunksize
    return self._impl.get_chunk_size()
  File "/Users/walter/pyvenvs/default/lib/python3.10/site-packages/oracledb/utils.py", line 51, in wrapped_f
    errors._raise_err(errors.ERR_FEATURE_NOT_SUPPORTED,
  File "/Users/walter/pyvenvs/default/lib/python3.10/site-packages/oracledb/errors.py", line 103, in _raise_err
    raise exc_type(_Error(message)) from cause
oracledb.exceptions.NotSupportedError: DPY-3001: getting the chunk size of a LOB is only supported in python-oracledb thick mode

The documentation for getchunksize() states:

Returns the chunk size for the internal LOB. Reading and writing to the LOB in chunks of multiples of this size will improve performance.

Is there even something like an "optmal chunk size" in thin mode? If this isn't relevant for thin mode the documentation (and/or the exception message?) should suggest which chunk size should be used for reading a LOB.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4