Re: Optimizer not using index on 120M row table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Optimizer not using index on 120M row table
Дата
Msg-id 24271.1049774575@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Optimizer not using index on 120M row table  ("Jim C. Nasby" <jim@nasby.net>)
Ответы Re: Optimizer not using index on 120M row table  ("Jim C. Nasby" <jim@nasby.net>)
Список pgsql-general
"Jim C. Nasby" <jim@nasby.net> writes:
> On Mon, Apr 07, 2003 at 11:51:17PM -0400, Tom Lane wrote:
>> or just declare project_id to be integer (hint: the space savings are
>> completely illusory in this example, anyway, because of alignment
>> requirements).

> Hrm... where can I find more info about that?

The authoritative reference is pg_type.typalign ... see
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/catalog-pg-type.html
In this example, your next field requires integer alignment, so the
two bytes "saved" by using smallint disappear into the padding.

            regards, tom lane


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

Предыдущее
От: Jonathan Bartlett
Дата:
Сообщение: Re: Why no performance boost although I added an index?
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Optimizer not using index on 120M row table