fixed-length row - Mailing list pgsql-general

From David Garamond
Subject fixed-length row
Date
Msg-id 4006A113.4070701@zara.6.isreserved.com
Whole thread Raw
Responses Re: fixed-length row
Re: fixed-length row
Re: fixed-length row
List pgsql-general
The MySQL manual recommends that we create a "fixed-length row" if
possible, for speed (especially scanning speed). A fixed-length row is a
row which is comprised of only fixed-length fields. A fixed-length field
takes a fixed amount of bytes for storage (e.g. INT = 4 bytes, CHAR(M) =
M bytes, etc).

Is there a similar recommendation in PostgreSQL? I notice that most data
types are stored in variable-length mode anyway (is cidr and inet data
types fixed-length?)

Is there a command/query in psql which can show storage requirement for
each field? For example:

db1=# \d t1;
       Table "public.t1"
  Column |     Type    | Modifiers | Storage size
--------+-------------+-----------+--------------
  id     | inet        | not null  | 24
  i      | integer     |           | 4
  c      | varchar(10) |           | variable
Indexes:
     "t1_pkey" primary key, btree (id)

--
dave


pgsql-general by date:

Previous
From: David Garamond
Date:
Subject: YAGT (yet another GUID thread)
Next
From: Uros
Date:
Subject: parse error in function