Re: Converting MySQL tinyint to PostgreSQL
От | Jim C. Nasby |
---|---|
Тема | Re: Converting MySQL tinyint to PostgreSQL |
Дата | |
Msg-id | 20050719072105.GN38511@decibel.org обсуждение исходный текст |
Ответ на | Re: Converting MySQL tinyint to PostgreSQL (Dawid Kuroczko <qnex42@gmail.com>) |
Ответы |
Re: Converting MySQL tinyint to PostgreSQL
|
Список | pgsql-general |
On Tue, Jul 19, 2005 at 02:02:28AM +0200, Dawid Kuroczko wrote: > On 7/18/05, Lincoln Yeoh <lyeoh@pop.jaring.my> wrote: > > However, maybe padding for alignment is a waste on the disk - disks being > > so much slower than CPUs (not sure about that once the data is in memory ). > > Maybe there should be an option to reorder columns so that less space is > > wasted. > > Out of curiosity, do I understand right that if I create table > > CREATE TABLE sample1 ( > a boolean, > b int, > c boolean > ); > > ...it will take more storage than: > > CREATE TABLE sample2 ( > b int, > a boolean, > c boolean > ); > > ...I don't think such ordering should matter, but I would like to know > how it really is. :) Actually, I believe that's the case with just about every database, though of course each one has different alignment constraints. The point is that I don't know of any database that will silently re-order fields under the covers to optimize storage. -- Jim C. Nasby, Database Consultant decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"
В списке pgsql-general по дате отправления: