Hi,

Cristina M <cristina.ma...@yahoo.com> writes:
> For each varchar column - I add an extra 4 bytes                              
>                                                                               
>        
> For each numeric column - I add an extra 8 bytes                              
>                                                                               
>        
> Add a 28 bytes row overhead.                                                  
>                                                                               
>        
>                                                                               
>                                                                               
>        
> For example if i have a table with col1: integer, col2: varchar, col3 
> varchar, I will get:                                                          
>                
> pages = (col1width + col2width + 4 + col3width + 4 + 28)* no. of rows
> / block size                                                                  
>                

You may find Greg Startk's presentation on the topic helpful:
  http://wiki.postgresql.org/wiki/Image:How_Long_Is_a_String.pdf

Regards,
-- 
dim

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to