Re: Compute the number of tuples in a block

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Compute the number of tuples in a block
Дата
Msg-id AANLkTinrafFcE1rZgmQinUhwvixdYOFSJB3F1t_tvDfv@mail.gmail.com
обсуждение исходный текст
Ответ на Compute the number of tuples in a block  (Pei He <hepeimail@gmail.com>)
Список pgsql-hackers
On Tue, Sep 21, 2010 at 11:42 PM, Pei He <hepeimail@gmail.com> wrote:
> Hi,
> In ctid, there are the block num, and the tuple offset inside the block.
>
> How can I know the maximum number of tuples in a block?
> The block size would be BLCKSZ.

See MaxHeapTuplesPerPage and MaxIndexTuplesPerPage.

> I am not quite sure where is the best place to find the size of the tuple in
> a table.

You might want to look at contrib/pageinspect.  See also PageGetItemId
and ItemIdGetLength.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


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

Предыдущее
От: Dennis Björklund
Дата:
Сообщение: Documentation, window functions
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: Multi-branch committing in git, revisited