Subject Re: Firebird network traffic - Blobs
Author nagypapi
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@...> wrote:
>
> > I am testing firebird 2.1 traffic with Wireshark, because I am
> > considering using it over Internet or taking the resources to write a
> > middleware (which if possible, we would skip).
> >
> > I have noticed that the majority of the packets in my case is about
> > blobs.
> >
> > Example:
> > packet nmb 1545 is "Prepare Statment" packet. I issued a
> > "select * from mytable"
> > sql command where mytable has 2 text type blob fields. The table has
> > about 2719 rows, the blob columns have very little data in them.
> >
> > I am using Java and JDBC and I'm instantly processing the whole
> > resultset, saving data into objects and variables.
> >
> > A few packets after the "Prepare statement" packet I get the following
> > packet cycle in about 20 000 - 25 000 packets:
> >
> > - Open blob 2
> > - Response
> > - Get segment
> > - Response
> > - Close blob
> > - Response
> > - Open blob 2 (again)
> > ....
> > and at the end:
> > - Free Statement
> > - Response
> > - Commit
> > - Response
> >
> >
> > Does using blobs cause excessive traffic?
> > Would traffic be smaller if I used big varchars instead?
> > Or is there any way to reduce traffic using blobs?
> >
> >
> > Thank you,
> > John
>
> yeh, don't select them til you need them. On the first pass, you
have the
> record key. Only ask for the blob when you want it by using the id.
> Alan
>

Hy Alan, thanks for the quick answer,
Our data handling unfortunatly processes blobs right after querying,
and not when they are needed.

Just for the record: I converted the textblob columns to varchar and
now packets have dropped from 20 000 - 25 000 to 600 - 1000.

Cheers,

John