Subject | Re: elementary question, blob versus varchar in ib |
---|---|
Author | bullardjuk |
Post date | 2002-03-20T17:02:05Z |
--- In IBObjects@y..., Frank Ingermann <frank.ingermann@f...> wrote:
That makes things quite a bit clearer to me. Now ALL my data gets
sent from the central database over a telephone line to a
distant 'local' database so this aspect is quite important to me. The
size of the central / local databases will not be significantly
changed by using varchar(1000) instad of a blob. But what is the
network consideration ? Would using a Blob mean that if it is empty
only the pointers would be sent down the line?? !!
I have tried sending the whole database as a windows file and that is
far quicker. But of course not very secure.
Dave
>*always*
> fyi: whenever a record is actually written to the gdb, FB/IB
> performs a run length encoding on the entire record. Iirc, even64bit ints
> get RLE'd when they are = 0. So from this pov, it makes absolutelyno
> difference whether your field is varchar(1), varchar(100) or varchar(1000).
> Same goes for char(1) vs. char(1000).H's
>
> BUT: it does make a *big* difference concerning network traffic.
>
> (i asked the same question some months ago on IB-Support, and Ann
> comment was "Well, somebody had to ask..." ;-) From her explanationi
> took the following conclusion:info
>
> - GDB space is hardly at all affected by the size you declare (-
>RLE)
> - Char vs. Varchar makes a difference of 2 length bytes, that's it.
> - for the network: across the wire always goes the decoded field in
> full length (may it all be blanks, no difference) + the length
>(1000) !!
> So a Select that returns 1000 all-blanks char fields will give you
> 1000 * (20+2) for varchar(20), but 1000 * (1000+2) for varchar
>Thanks for your help Frank.
> -> my biggest wish for FB2: run length encoding for the network
> transmission! <bg>
>
> fwiw - regards,
> fingerman
That makes things quite a bit clearer to me. Now ALL my data gets
sent from the central database over a telephone line to a
distant 'local' database so this aspect is quite important to me. The
size of the central / local databases will not be significantly
changed by using varchar(1000) instad of a blob. But what is the
network consideration ? Would using a Blob mean that if it is empty
only the pointers would be sent down the line?? !!
I have tried sending the whole database as a windows file and that is
far quicker. But of course not very secure.
Dave