Re: Problem with estimating pages for a table

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: Problem with estimating pages for a table
Дата
Msg-id 87octw9dm3.fsf@hi-media-techno.com
обсуждение исходный текст
Ответ на Problem with estimating pages for a table  (Cristina M <cristina.maier@yahoo.com>)
Список pgsql-hackers
Hi,

Cristina M <cristina.maier@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: New trigger option of pg_standby
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Synchronous replication: Promotion of Standby to Primary