Re: Values larger than 1/3 of a buffer page cannot be indexed.

From: Viktor Nagy <viktor(dot)nagy(at)toolpart(dot)hu>
To: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Values larger than 1/3 of a buffer page cannot be indexed.
Date: 2011-03-14 16:40:47
Message-ID: AANLkTikfS+zyRkk8J=+NjnSXo3OfkjaSq25LMY+YG8o6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

thanks, this worked.

On Sun, Mar 13, 2011 at 7:05 PM, Dmitriy Igrishin <dmitigr(at)gmail(dot)com> wrote:

> Hey Viktor,
>
> 2011/3/13 Viktor Nagy <viktor(dot)nagy(at)toolpart(dot)hu>
>
>> hi,
>>
>> when trying to insert a long-long value, I get the following error:
>>
>> index row size 3120 exceeds maximum 2712 for index "ir_translation_ltns"
>> HINT: Values larger than 1/3 of a buffer page cannot be indexed.
>> Consider a function index of an MD5 hash of the value, or use full text
>> indexing.
>>
>> is there a way to generate this recommended function index of an md5 hash
>> on an already existing database and tables (filled with data)?
>>
> Just create index this way, e.g.
> CREATE INDEX ir_translation_ltns ON tab ((md5(col)));
> where "tab" and "col" are table and column of which you want
> to create btree index.
>
>>
>> thanks,
>> Viktor
>>
>
>
>
> --
> // Dmitriy.
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-03-14 16:52:24 Re: Select for update with offset interferes with concurrent transactions
Previous Message Andrew Sullivan 2011-03-14 16:29:01 Re: Autocommit off - commits/rollbacks