Tom Lane <[EMAIL PROTECTED]> writes:

> Gregory Stark <[EMAIL PROTECTED]> writes:
>> In any case it seems a bit backwards to me. Wouldn't it be better to
>> preserve bits in the case of short length words where they're precious
>> rather than long ones? If we make 0xxxxxxx the 1-byte case it means ...
>
> Well, I don't find that real persuasive: you're saying that it's
> important to have a 1-byte not 2-byte header for datums between 64 and
> 127 bytes long.  Which is by definition less than a 2% savings for those
> values.  

Sure, but my thinking was that saving one byte on data between 64 and 127
bytes long is more important than saving two bytes on data between 4k and 8k
or whatever the range was in that proposal.

> I think its's more important to pick bitpatterns that reduce the number of
> cases heap_deform_tuple has to think about while decoding the length of a
> field --- every "if" in that inner loop is expensive.

I'll have to spend a few hours tomorrow becoming one with that section of
code. I looked at it already and was surprised at how short it was already so
I can understand what you mean.


-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to