On Wed, Nov 21, 2007 at 09:51:22AM -0800, SHARMILA JOTHIRAJAH wrote: > Thanks for the detailed explanation Tom. You are rigt...The number of pages > for this tables as per pg_class is 189. > > I have a few questions > 1. How do you find the MAXALIGN of the machine? And what is that used for?
MAXALIGN is the preferred alignment for structure objects, iirc. It's generally less efficient to access unaligned objects than aligned ones, though this is architechure specific. You should be able to find it in your pg_config.h under MAXIMUM_ALIGNOF,. > 2. How does null columns account for this space. For example, if I > have the same table (10 cols --5 varchars and 5 numerics) in which 8 > cols are null and 2 cols(1 varchar and 1 num) are not null, how is > the storage space affected for this case? The cost is typically one bit per column in the table, unless there are no NULLs in which case it costs nothing. 10 cols = 2 bytes, which may or may not be swallowed by alignment. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy
signature.asc
Description: Digital signature