db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomohito Nakayama (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-609) Returning ByteArrayInputStream from ResultSet is not appropriate
Date Sun, 09 Oct 2005 08:29:48 GMT
    [ http://issues.apache.org/jira/browse/DERBY-609?page=comments#action_12331662 ] 

Tomohito Nakayama commented on DERBY-609:

About 2: Performance of program :

I found that value of Clob and Blob are stored in memory as 
 org.apache.derby.client.am.Clob#string_ typed as String and
 org.apache.derby.client.am.Blob#binaryString_ typed as byte[]

ResultSet seems to return information retrieved from those variables.
If Clob and Blob have large size of data ,  this structure will cause performance problem.

I think we should transfer problem of this structure to another issue , because it will be
much amount of work .

> Returning ByteArrayInputStream from ResultSet is not appropriate
> ----------------------------------------------------------------
>          Key: DERBY-609
>          URL: http://issues.apache.org/jira/browse/DERBY-609
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Reporter: Tomohito Nakayama
>     Assignee: Tomohito Nakayama

> Point where it is not appropriate :
> 1: Compatibility
> The InputStream returned from result set is closed when other getXXXX method was called
> http://java.sun.com/j2se/1.5.0/docs/api/java/sql/ResultSet.html
> However closing ByteArrayInputStream have no effect at all .
> http://java.sun.com/j2se/1.5.0/docs/api/java/io/ByteArrayInputStream.html#close()
> It seems intended that closable InputStream was returned from result set .
> If ByteArrayInputStream was returned from result set , the stream cannot be closed, 
> and compatibility would be lost .
> 2: Performance of program 
> Information inputted from ByteArrayInputStream needs to be expanded to memory as byte[]
object .
> If large byte[] object was created for each ByteArrayInputStream object , 
> program will run in bad performance .
> // I think problem is when information typed as LOB was retrieved from ResultSet .
> // Because such informations typed as LOB tend to be large amount .

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message