How can fixed and variable width columns perform similarly?

Поиск
Список
Период
Сортировка
От Siddharth Anand
Тема How can fixed and variable width columns perform similarly?
Дата
Msg-id 50444.209.51.183.100.1177687911.squirrel@mailbox.etsy.com
обсуждение исходный текст
Ответы Re: How can fixed and variable width columns perform similarly?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: How can fixed and variable width columns perform similarly?  ("Dave Dutcher" <dave@tridecap.com>)
Список pgsql-performance
Hi!
I read the link below and am puzzled by or curious about something.
http://www.postgresql.org/docs/8.1/interactive/datatype-character.html

The Tip below is intriguing

"Tip:  There are no performance differences between these three types,
apart from the increased storage size when using the blank-padded type.
While character(n) has performance advantages in some other database
systems, it has no such advantages in PostgreSQL. In most situations text
or character varying should be used instead."

How can a field that doesn't have a limit like "text" perform similarly to
char varying(128), for example? At some point, we need to write data to
disk. The more data that needs to be written, the longer the disk write
will take, especially when it requires finding free sectors to write to.

Another interesting quote from the same page is the following:

"Long values are also stored in background tables so they do not interfere
with rapid access to the shorter column values. "

If the long values are stored in a separate table, on a different part of
the disk, doesn't this imply an extra disk seek? Won't it therefore take
longer?


Sid








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

Предыдущее
От: "Siddharth Anand"
Дата:
Сообщение: [Fwd: ] How
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Feature Request --- was: PostgreSQL Performance Tuning