Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

blob and query heap memory

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to insert a large blob (10 megs) into a db2 database using JDBC, I get an error about the query heap not having enough memory. When I increase the query heap size to more than 10 megs, the query executes fine.
Interestingly enough, the same blob inserts fine using a CPM.
If I guess a number too low, I could wind up with a large blob that crashes at runtime. Is there any way to stream the byte[] passed so that JDBC doesn't try to load the whole thing in memory at once?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic