Re: [GENERAL] space-effective varchar(255)-like arrangement
| От | Bruce Momjian |
|---|---|
| Тема | Re: [GENERAL] space-effective varchar(255)-like arrangement |
| Дата | |
| Msg-id | 199812261939.OAA04063@candle.pha.pa.us обсуждение исходный текст |
| Ответ на | Re: [GENERAL] space-effective varchar(255)-like arrangement (Jan Vicherek <honza@ied.com>) |
| Список | pgsql-general |
> hmm, thus if one block has 8192 bytes, and if there is 9-byte overhead > for each row, then I can store 390 rows in one block if, on average, > "names" are 10 chars in length ? echo $[ 8192 / ( 9 + 10 + 2 ) ] # = 390 Yes. See FAQ for row overhead calculations. > If each record has variable length, pg has no way of calculating where > is start of next record, other than going through the block and summing up > lengths of varchars to determine where does next record begin, right ? > (above I use word "record" and "row" interchangeably). It is not that bad. It knows where each record starts. It is finding a certain field in the record that is a problem for any field AFTER the first variable length field. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-general по дате отправления: