Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOBs are fully materialised #16

Closed
marschall opened this issue Nov 21, 2016 · 5 comments
Closed

LOBs are fully materialised #16

marschall opened this issue Nov 21, 2016 · 5 comments
Assignees
Labels
Enhancement An enhancement to the driver. Lower priority than bugs.
Milestone

Comments

@marschall
Copy link
Contributor

BLOBs, CLOBs and NCLOBs are fully materialised into a single byte[]/String. In the case of large content (imagine a file stored in a BLOB) this puts quite a lot of pressure on both the allocator and the heap. It also defeats the point of streaming. Consider the following use case:

try (InputStream stream = resultSet.getBlob("column_name").getBinaryStream()) {
    // stream content
}
@ajlam
Copy link
Member

ajlam commented Nov 21, 2016

@marschall - Any suggestions on how to redesign this?

@marschall
Copy link
Contributor Author

As far as I can tell the existing ServerResultSet#getBinaryStream and SQLServerResultSet#getCharacterStream methods provide streaming. One could imagine building a LOB implementation around these or their underlying concepts.

@xiangyushawn xiangyushawn added the Enhancement An enhancement to the driver. Lower priority than bugs. label Nov 21, 2016
@Suraiya-Hameed
Copy link
Contributor

Thanks @marschall! That was a good catch, we will redesign it in the future releases.

@AfsanehR-zz AfsanehR-zz self-assigned this Dec 9, 2016
@v-nisidh v-nisidh modified the milestone: Next Tasks Feb 6, 2017
@v-nisidh v-nisidh modified the milestones: 6.1.5, Next Tasks Feb 14, 2017
@AfsanehR-zz
Copy link
Contributor

@marschall opened #172 regarding this issue.

@v-nisidh v-nisidh mentioned this issue Mar 10, 2017
@v-nisidh v-nisidh modified the milestones: 6.1.6, 6.1.5 Mar 20, 2017
@AfsanehR-zz
Copy link
Contributor

AfsanehR-zz commented Mar 28, 2017

closed by pr #172.
Thank you @marschall for pointing out this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An enhancement to the driver. Lower priority than bugs.
Projects
None yet
Development

No branches or pull requests

7 participants