Re: Problem reading CLOB data from query result

Shai Berger <shai-9mtU2oJkgntWk0Htik3J/[email protected]> Wed, 16 Dec 2015 03:01:02 +0200
Newsgroups gmane.comp.python.db.cx-oracle
Organization Platonix Joint Ventures
Message-ID <[email protected]>
On Tuesday 15 December 2015 23:04:51 Andrew Wheelwright wrote:
> 
> I have no idea what is magical about 200 in my environment.  I'm guessing
> that I'm exhausting some resource related to our Oracle server but I lack
> the experience to know what that might be or how to find that out.
> 

Actually, 200 sounds more like a client-side limit. The first suspect is 
cursor.arraysize, which is 50 by default but many set it differently. It is 
only supposed to affect performance, but you may have hit some corner that 
makes it affect more.

Also, I would replace:

	result = cursor.fetchone()
	while result is not None:
	   ...
	   result = cursor.fetchone() # <---- Invalid handle error thrown here

with 

	for result in cursor:
	   ...

just seems nicer, and fits better with 
http://cx-oracle.readthedocs.org/en/latest/lob.html

HTH,
	Shai.

------------------------------------------------------------------------------