Subject | Re: [Firebird-Architect] Re: Record Encoding |
---|---|
Author | Dmitry Yemanov |
Post date | 2005-05-15T20:08:32Z |
"Jim Starkey" <jas@...> wrote:
of your thoughts?
particular blob instance. The lowest level of control, although I'm not sure
whether we need two rows having their blobs compressed differently? If this
doesn't make much sense in practice, then we should use some blob column
flag as a compression type. Or is it feasible to have three levels of
control: blob instance (via BPB) -> column (via RDB$FLAGS) -> config entry?
I doubt this is necessary, but I don't use blobs much in my apps, so let's
others decide.
We need to decide about the compression control - column or blob instance
level (see above) - before going further. It mostly dictates rules on how
something should be stored and transmitted over the wire. As for whether a
server generated temporary blob should be compressed or not before being
either materialized or transmitted, I don't have any strong preference.
Let's just default to the global setting (i.e. config option)?
Dmitry
>Fine.
> I'm getting ready to punt on this question and suggest that we require
> that blobs that support blob seek be declared as uncompressed or the
> moral equivalent.
> A client can choose not to compress. Simple enough?Of course ;-)
> >Agreed. Should temporary blobs to be also compressed when sent to theOkay, I also agree here.
> >client?
>
> I don't see any reason why not.
> There is a question, however,Could you please elaborate what you mean here?
> as to whether the compression information is part of the staged blob or
> a compression prefix on edsBlobIdxxx. If somebody knows the answer, I'd
> like to hear it.
> We've lived with no compression on blobs and run length encoding inFully agreed.
> records for 20 years. I'd be perfectly happy to audition the existing
> schemes that are license compatible with Firebird and pick one that
> conforms to our best appreciation of tradeoffs and live with it. In
> five to ten years somebody will come up with a better one, and we can
> add a second.
> >I see the only solution - add a new blob type (which is independent fromall
> >streamed/segmented). I mean a new BPB option - compressed/not compressed.
> >The default behaviour (no option is specified) is either hardcoded or
> >settable via the config file. With a default set to compressed, we have
> >the benefits of Jim's proposal, but it still keeps other usage optionsfrom
> >possible. This solution solves all needs and costs us virtually nothing
> >the implementation POV.Does it mean we're on the same line of thinking or have I missed some turn
>
> See above.
of your thoughts?
> >1) what should a blob seek do for a compressed blob? Decompress inserver's
> >memory or return an error?LOL ;-)
>
> Check the cpu type. If 486, it should short the address lines of the
> memory bus to 110/220 volts and fry the sucker. On other machines it
> should check for user name. If "Roman" it should throw an exception,
> other decompress in memory.
> >2) how should temporary blobs be transfered? Inherit the compress optionIf we use a BPB flag, then a compression type is an attribute of a
> >from its persistent source? Use a config setting?
>
> I await your comments.
particular blob instance. The lowest level of control, although I'm not sure
whether we need two rows having their blobs compressed differently? If this
doesn't make much sense in practice, then we should use some blob column
flag as a compression type. Or is it feasible to have three levels of
control: blob instance (via BPB) -> column (via RDB$FLAGS) -> config entry?
I doubt this is necessary, but I don't use blobs much in my apps, so let's
others decide.
We need to decide about the compression control - column or blob instance
level (see above) - before going further. It mostly dictates rules on how
something should be stored and transmitted over the wire. As for whether a
server generated temporary blob should be compressed or not before being
either materialized or transmitted, I don't have any strong preference.
Let's just default to the global setting (i.e. config option)?
Dmitry