Re: Size of tuples

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: Size of tuples
Дата
Msg-id 452AF58D.8050506@cox.net
обсуждение исходный текст
Ответ на Size of tuples  ("Alex Turner" <armtuk@gmail.com>)
Ответы Re: Size of tuples  ("Alex Turner" <armtuk@gmail.com>)
Список pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/09/06 19:10, Alex Turner wrote:
> I have a table whose definition is basically
>
> create table foo (
> a int,
> b int,
> c int,
> d date
> );
>
> and when fully populated, select relpages*8192::long/reltuples from
> pg_class
> where relname='foo';
> gives around 52.  Why is it so wide when there are only 4*4=16 bytes of
> actual data?

http://www.postgresql.org/docs/faqs.FAQ.html#item4.5

   23  row header (no OIDs)
 + 16  your row size
 +  4  page pointer
   --
   43

I'd guess that the extra 4 bytes is from the null bits, page
overhead, etc.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFKvWNS9HxQb37XmcRAuadAKDTDW3nSap3VutXXZB1vHnAFXMd8QCeIqpc
vMEiTn+MTBeP6wEkLO3zdwI=
=VeUp
-----END PGP SIGNATURE-----

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

Предыдущее
От: "George Pavlov"
Дата:
Сообщение: Re: postgres query log analysis?
Следующее
От: "jungmin shin"
Дата:
Сообщение: query optimization with UDFs