Re: Text/Varchar performance... - Mailing list pgsql-performance

From Steinar H. Gunderson
Subject Re: Text/Varchar performance...
Date
Msg-id 20051010125422.GA7454@uio.no
Whole thread Raw
In response to Re: Text/Varchar performance...  ("Ahmad Fajar" <gendowo@konphalindo.or.id>)
List pgsql-performance
On Mon, Oct 10, 2005 at 06:28:23PM +0700, Ahmad Fajar wrote:
> 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.

That really depends on the queries. An index will help some queries (notably
<, = or > comparisons, or LIKE 'foo%' with the C locale), but definitely not
all (it will help you nothing for LIKE '%foo%').

> 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.

So can varchar.

/* Steinar */
--
Homepage: http://www.sesse.net/

pgsql-performance by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: Compression of text columns
Next
From: Stef
Date:
Subject: Re: Compression of text columns