Re: Optimizer not using index on 120M row table - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: Optimizer not using index on 120M row table
Date
Msg-id 20030407232941.P31861@flake.decibel.org
Whole thread Raw
In response to Re: Optimizer not using index on 120M row table  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Optimizer not using index on 120M row table  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Tue, Apr 08, 2003 at 12:02:55AM -0400, Tom Lane wrote:
> 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.

Thanks, makes sense to me now. Next question... will pgsql intelligently
order things in an item record so that they're stored most efficiently?
ie: group all the byte-align stuff together, all the 2-byte aligned
stuff, etc.? Or will it just go off of the order defined in the create
table statement? If it's the later, is there any way to re-organize
things without rebuilding the table from scratch? What other things
should be considered for column ordering?

Thanks!
--
Jim C. Nasby (aka Decibel!)                    jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
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 by date:

Previous
From: Neil Conway
Date:
Subject: Re: Optimizer not using index on 120M row table
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Optimizer not using index on 120M row table