Re: Text/Varchar performance...

From: "Ahmad Fajar" <gendowo(at)konphalindo(dot)or(dot)id>
To: "'Cristian Prieto'" <cristian(at)clickdiario(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Text/Varchar performance...
Date: 2005-10-10 11:28:23
Message-ID: SVONE1yEXUIEAOeIiGX0000000c@ki-communication.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

Dear Cristian,

If you need to index the field, you must know that it limit the length up to
1000 bytes. So if you need to index the field you must limit the field type,
ex: varchar(250), than you can index the field and you can gain better
perfomance in searching base on the fields, because the search uses the
index you have been created.
If you do not need to index the field, you can use the text field. Because
text field can store data up to 4 Gbytes.

Regards,
ahmad fajar

-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org
[mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of Cristian Prieto
Sent: Kamis, 06 Oktober 2005 1:22
To: pgsql-general(at)postgresql(dot)org; pgsql-performance(at)postgresql(dot)org
Subject: [PERFORM] Text/Varchar performance...

Hello, just a little question, It's preferable to use Text Fields or
varchar(255) fields in a table? Are there any performance differences in the
use of any of them?

Thanks a lot for your answer!

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lincoln Yeoh 2005-10-10 11:34:54 Re: INSERT OR UPDATE?
Previous Message han.holl 2005-10-10 09:29:38 Re: How to inject knowledge into a Postgres database

Browse pgsql-performance by date

  From Date Subject
Next Message Stef 2005-10-10 12:17:21 Compression of text columns
Previous Message Andy 2005-10-10 09:42:43 Re: Server misconfiguration???