Binary data and performance

30 views
Skip to first unread message

Carl Hasselskog

unread,
Apr 4, 2012, 6:33:55 AM4/4/12
to h2-da...@googlegroups.com
I have two questions regarding binary data:
  1. I have a column that will contain approx. 1KB-5Kb per row. What is generally the best option here, blob or binary?
  2. If I use blob, will the data be read from disk if I include the column in my query but don't read from the binary stream in the ResultSet?
Regards
Carl Hasselskog

Noel Grandin

unread,
Apr 4, 2012, 7:55:04 AM4/4/12
to h2-da...@googlegroups.com, Carl Hasselskog


On 2012-04-04 12:33, Carl Hasselskog wrote:
I have two questions regarding binary data:
  1. I have a column that will contain approx. 1KB-5Kb per row. What is generally the best option here, blob or binary?
binary

  1. If I use blob, will the data be read from disk if I include the column in my query but don't read from the binary stream in the ResultSet?
no.

wburzyns

unread,
Apr 4, 2012, 9:50:33 AM4/4/12
to H2 Database
According to my own measurements made almost a year ago for the
aforementioned data size, BLOB type offers slightly better performance
(a few percent) over BINARY. So if you don't need index on this column
I'd go with BLOB.


Regards,
wburzyns

On Apr 4, 1:55 pm, Noel Grandin <noelgran...@gmail.com> wrote:
> On 2012-04-04 12:33, Carl Hasselskog wrote:> I have two questions regarding binary data:
>
> >  1. I have a column that will contain approx. 1KB-5Kb per row. What is
> >     generally the best option here, blob or binary?
>
> binary
>
> >  1. If I use blob, will the data be read from disk if I include the
Reply all
Reply to author
Forward
0 new messages