Re: Converting MySQL tinyint to PostgreSQL

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Converting MySQL tinyint to PostgreSQL
Дата
Msg-id 200507132352.j6DNq4x15417@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Converting MySQL tinyint to PostgreSQL  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Ответы Re: Converting MySQL tinyint to PostgreSQL  ("Jim C. Nasby" <decibel@decibel.org>)
Список pgsql-general
Ron Mayer wrote:
> Martijn van Oosterhout wrote:
> >
> > Well, you get another issue, alignment. If you squeeze your string
> > down, the next field, if it is an int or string, will get padded to a
> > multiple of 4 negating most of the gains. Like in C structures, there
> > is padding to optimise access.
>
> Anecdotally I hear at least as many people say that their database
> is more I/O bound than CPU bound; and it seems that adding bytes
> for alignment is a way of reducing CPU for more disk I/O.
>
> I guess unaligned access so expensive that it makes up for the extra i/o?

This is a good point.  We have always stored data on disk that exactly
matches its layout in memory.  We could change that, but no one has
shown it would be a win.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Table Update Systems (was: chosing a database name)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Transparent encryption in PostgreSQL?