From: root(at)blik(dot)samara(dot)su (Samara CIT)
To: undisclosed-recipients:;
Subject:
Date: 1998-12-29 10:25:23
Message-ID: 199812291025.OAA19563@blik.samara.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>From [194.58.47.100]!mcit.aris.ru!hub.org!owner-pgsql-hackers Mon Dec 28 10:36:52 GMT 1998 remote from doom
Received: from mcit.aris.ru ([194.58.47.100]) by doom.samara.su with SMTP id AA00394
(5.65/IDA-simtel for <evg(at)relay1(dot)cit(dot)ru>); Mon, 28 Dec 1998 10:36:52 +0400
Received: from hub.org by mcit.aris.ru with ESMTP id JAA15478;
(8.8.5-MVC-230497/vak/1.9) Sun, 27 Dec 1998 09:45:26 +0300 (MSK)
Received: from localhost (majordom(at)localhost)
by hub.org (8.9.1/8.9.1) with SMTP id BAA04767;
Sun, 27 Dec 1998 01:40:47 -0500 (EST)
(envelope-from owner-pgsql-hackers(at)hub(dot)org)
Received: by hub.org (TLB v0.10a (1.23 tibbs 1997/01/09 00:29:32)); Sun, 27 Dec 1998 01:36:02 +0000 (EST)
Received: (from majordom(at)localhost)
by hub.org (8.9.1/8.9.1) id BAA03806
for pgsql-hackers-outgoing; Sun, 27 Dec 1998 01:35:28 -0500 (EST)
(envelope-from owner-pgsql-hackers(at)postgreSQL(dot)org)
Received: from trends.net (root(at)clio(dot)trends(dot)ca [209.47.148.2])
by hub.org (8.9.1/8.9.1) with ESMTP id BAA03232
for <pgsql-hackers(at)postgresql(dot)org>; Sun, 27 Dec 1998 01:30:30 -0500 (EST)
(envelope-from honza(at)ied(dot)com)
Received: from enrico.ied.com (root(at)miranda(dot)uwaterloo(dot)ca [129.97.130.69])
by trends.net (8.8.8/8.8.8) with ESMTP id WAA26868
for <pgsql-hackers(at)postgreSQL(dot)org>; Sat, 26 Dec 1998 22:37:23 -0500 (EST)
Received: from ann.ied.com (honza(at)ann(dot)ied(dot)com [192.168.200.20])
by enrico.ied.com (8.8.7/8.8.7) with ESMTP id WAA25889
for <pgsql-hackers(at)postgreSQL(dot)org>; Sat, 26 Dec 1998 22:36:23 -0500
Date: Sat, 26 Dec 1998 22:36:53 -0500 (EST)
From: Jan Vicherek <honza(at)ied(dot)com>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: [HACKERS] space usage of NULL fields
Message-Id: <Pine(dot)LNX(dot)4(dot)04(dot)9812262213380(dot)11035-100000(at)ann(dot)ied(dot)com>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-pgsql-hackers(at)postgreSQL(dot)org
Precedence: bulk

Hello,

a quick question (I couldn't contact postgresql.org, so I didn't check
the FAQ, but I doubt it would be there.)

When I create a table with field "nnn float8" and total row size, say
140 bytes, and then I insert a row with NULL in this field, will my record
take up those 8 bytes in physical page (say 140 bytes) or will it take up
less (like 140-8=132), i.e. will it be shortened by those 8 bytes, since
the value is NULL and no information is stored in that field ? ( I *hate*
run-on sentences :)

In general, what are the savings/overheads associated in PG with
NULL/not NULL fields ? I.e. if will I save the space if I define the field
as varchar(8) instead of float8 ?

Thanx,

Jan

-- Gospel of Jesus is the saving power of God for all who believe --
## To some, nothing is impossible. ##
http://Vicherek.Waterloo.on.ca/

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter T Mount 1998-12-29 13:04:42 Problem with create user in latest CVS
Previous Message Samara CIT 1998-12-29 10:25:22