From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Maksim Likharev <mlikharev(at)aurigin(dot)com> |
Cc: | PostgreSQL List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Datatypes and performance |
Date: | 2003-07-04 21:54:08 |
Message-ID: | 20030704215408.GB21432@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Jul 04, 2003 at 02:22:39PM -0700, Maksim Likharev wrote:
> Ok, what I see here tells me that text is slower then fixed len varchar,
> due to stored in separate table ( but how else you can store long fields
> ).
> so postgres has to read another page(s) in order to get long value.
That's regardless of the datatype: a varchar longer than 2 KiB IIRC will
be stored in a separate table, just as a text longer than 2 KiB.
There's no difference _at all_ for those two datatypes _except_ that the
former is checked for maximum length. If you store 256 chars in a TEXT
field it will be in the main table as it were a varchar(256).
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Nunca confiaré en un traidor. Ni siquiera si el traidor lo he creado yo"
(Barón Vladimir Harkonnen)
From | Date | Subject | |
---|---|---|---|
Next Message | Bjoern Metzdorf | 2003-07-04 22:24:18 | Re: PostgreSQL vs. MySQL |
Previous Message | Nigel J. Andrews | 2003-07-04 21:30:41 | Re: Datatypes and performance |