Thread: Indexes on character type columns

Indexes on character type columns

From
Guido Neitzer
Date:
Hi.

Is there a limitation of the length of a char or varchar(x) column
for indexing?

cug

Attachment

Re: Indexes on character type columns

From
Martijn van Oosterhout
Date:
On Thu, Dec 22, 2005 at 11:24:12AM +0100, Guido Neitzer wrote:
> Hi.
>
> Is there a limitation of the length of a char or varchar(x) column
> for indexing?

For btrees at least, yes. Around a third of a page or about 2713 bytes
by default. For bigger things you probably want tsearch anyway.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

Re: Indexes on character type columns

From
Guido Neitzer
Date:
On 22.12.2005, at 11:27 Uhr, Martijn van Oosterhout wrote:

> For btrees at least, yes. Around a third of a page or about 2713 bytes
> by default. For bigger things you probably want tsearch anyway.

Thanks.

cug

Attachment