From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com> |
Cc: | TNO <tnodev(at)free(dot)fr>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: [PERFORMANCE] Beetwen text and varchar field |
Date: | 2006-01-09 23:50:31 |
Message-ID: | 200601092350.k09NoV022662@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
See the FAQ.
---------------------------------------------------------------------------
Steinar H. Gunderson wrote:
> On Mon, Jan 09, 2006 at 11:58:19AM +0100, TNO wrote:
> > what is the best for a char field with less than 1000 characters?
> > a text field or a varchar(1000)
>
> They will be equivalent. text and varchar are the same type internally -- the
> only differences are that varchar can have a length (but does not need one),
> and that some casts are only defined for text.
>
> If there's really a natural thousand-character limit to the data in question,
> use varchar(1000); if not, use text or varchar, whatever you'd like.
>
> /* Steinar */
> --
> Homepage: http://www.sesse.net/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Andrea Arcangeli | 2006-01-10 01:44:47 | NOT LIKE much faster than LIKE? |
Previous Message | Luke Lonergan | 2006-01-09 21:29:30 | Re: help tuning queries on large database |