Subject | Re: [Firebird-Java] Re: Blob Performance hints? |
---|---|
Author | Rick Fincher |
Post date | 2003-05-09T02:46:59Z |
William replied:
storing documents that are as large as 20 meg.
field as subType 0, will this cause problems with rs.getString?
As an aside, is there any implication to using 20 meg strings? Can a string
be that large?
Roman also replied:
about 1.0 meg per sec.
I think the rest of the difference can be attributed to the overhead of the
servlet engine, etc.
Why did you say to use only use ResultSet.getBytes(int) as a test? Is there
a problem with using it?
Thanks for the solutions!
Rick
> > Anybody have any hints on how to improve performance?I'll keep that in mind for other programs but unfortunatlty this one is
>
> Yes, make sure the blob segment size in the db is larger than the
> largest blob if possible. I noticed a slight difference in performance
> when I did that.
storing documents that are as large as 20 meg.
> I would try using rs.getString and see if you notice a performance diff.Are you using subType 0 (bin) or 1 (text)? I initially created the blob
field as subType 0, will this cause problems with rs.getString?
As an aside, is there any implication to using 20 meg strings? Can a string
be that large?
Roman also replied:
> What exactly throughput you get? I would expect something aroundI was getting about 0.2 meg per second. After I tried this it increased to
> ~2-2.5 MB/s on big chunks of data.
>
> > Should I increase the initial size of the byte array and/or match it
> > to multiples of the block size of the blob's database?
>
> Should not be an issue. FBBlob uses BufferedInputStream with buffer
> length you specify in connection params.
>
> Check if ResultSet.getBytes(int) works faster (only as a test).
about 1.0 meg per sec.
I think the rest of the difference can be attributed to the overhead of the
servlet engine, etc.
Why did you say to use only use ResultSet.getBytes(int) as a test? Is there
a problem with using it?
Thanks for the solutions!
Rick