Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 13 Aug 2013 @ 10:32:50 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Space occupied in varchar columns
 
From:   Anomy Anom

<-- Anonymously Posted: Tuesday, August 13, 2013 03:58 -->

Hi All

Our TD system has a block size of 512 bytes.

I did a simple test like below

     CREATE MULTISET TABLE testvarchar
     (col1 VARCHAR(510));

Ideally, when I insert a text with 510 characters, it should still hold within a single datablock (510 characters + 2 presence and offset bytes).

But according to my test here, I could not fit anything more than 431 characters into a single datablock.

I also tried inserting NULLs and I could fit in only 25 NULLs in col1 in one datablock, whereas I would have expected around 255 nulls.

Am I missing something here?

I'm doing these as a part of my evaluation using varchars vs char/ compress. I will be really grateful if you can point out an algorithm that you have implemented in this regard.


Regards



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023