Subject RE: [firebird-support] Firebird network traffic - Blobs
Author Alan McDonald
> 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