On Monday, February 23, 2015, Slavomir Skopalik <skopa...@elektlabs.cz>
wrote:

> On 23.2.2015 20:36, James Starkey wrote:
> > Encode null as a value type and skip the null flags altogether -- saves a
> > couple of bytes for every record.
> I think to use flags only for nullable fields.
> In this case, you will lost one byte per each NULL field, but only when
> is it NULL, I will be lost one byte per 8 nullable fields every time.
> Special type value can be easier to parse.


"Parsing" is a switch statement on type.  Null is trivially handled.

Null flags are required for all nullable fields even if none are null.  If
most fields are null, flags are denser, though the decode logic is much
more complicated, hence expensive, than to just treat null as a type.  Null
flags were required in my original encoding as there was no possible
in-band encoding for nulls.


>
> >
> > I'd encode the format version as the first value. That will let you have
> > 2^63 format versions, which should be enough.
> >
> > I'd getvthe transaction id in the record header rather than the record
> > itself so it can be compared (a high frequency operation) with decoding.
> It sounds like background for flash back function
>
>
> http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS01001
>
> Slavek
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>


-- 
Jim Starkey
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to