• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaDB maximum BLOB size

 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an application that stores binary data in BLOBs in a JavaDB (aka Derby) database. The data is usually quite small (e.g. 10 kilobytes) but just occasionally rather larger (we've seen 500 kilobytes).

When I first wrote the application, I somewhat arbitrarily specified 256 kilobytes as the maximum BLOB size. The 500k data therefore overflowed this.

I could just raise the limit a bit. However, I have some questions.

Is there any benefit to minimising the specified BLOB size?

If no limit is specified, you get the JavaDB limit, which is 2GB, I think. Does it save disk space or improve performance to limit the size?

Is there any reason why I shouldn't just remove the limit altogether and let it go up to the JavaDB limit (which it won't even get close to hitting - I hope!).
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34198
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,
As far as I know, the database stores a pointer to the BLOB in the part of the table with the other columns. So I don't think there would be ramifications to changing the BLOB size. In fact some databases don't even allow you too set the maximize size. The true maximum is set by the database and if you use less it is fine. They don't introduce an artificial limit.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic