From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Nick Burrett <nick(at)dsvr(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: ShmemAlloc errors |
Date: | 2003-10-20 13:12:44 |
Message-ID: | 1852.1066655564@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Nick Burrett <nick(at)dsvr(dot)net> writes:
> I expected that specifying a specific length for a column would allow
> for more efficient indexing and searching because:
> a) you already know the exact length of the column
> b) potentially the column-data could be stored starting on a word-boundary
> c) apply string comparison functions that are optimised for data
> starting on word-boundaries (i.e. by comparing words rather than bytes).
> Certainly for the C-locale.
None of those considerations really apply for Postgres. We used to have
some (very marginal anyway) optimizations that assumed CHAR(n) is
fixed-width, but they went away when we added support for multibyte
character encodings. In any case there isn't anything here that
wouldn't be swamped by increased I/O demands due to the wasted space.
Maybe if all your machine names run between 29 and 32 characters it'd
be worth doing, but if you're paying any actual space cost to padding
I think it has to be a net loss.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Johnson, Shaunn | 2003-10-20 13:19:02 | how to use pg_resetxlog |
Previous Message | Ben-Nes Michael | 2003-10-20 13:09:35 | Re: Recomended FS |