Re: Values larger than 1/3 of a buffer page cannot be indexed. - Mailing list pgsql-general

From Rob Sargent
Subject Re: Values larger than 1/3 of a buffer page cannot be indexed.
Date
Msg-id 4D7D3925.9070707@gmail.com
Whole thread Raw
In response to Re: Values larger than 1/3 of a buffer page cannot be indexed.  (Brian Hirt <bhirt@me.com>)
Responses Re: Values larger than 1/3 of a buffer page cannot be indexed.  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general

Brian Hirt wrote:
> On Mar 13, 2011, at 12:05 PM, Dmitriy Igrishin wrote:
>
>> Hey Viktor,
>>
>> 2011/3/13 Viktor Nagy <viktor.nagy@toolpart.hu
>> <mailto:viktor.nagy@toolpart.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.
>
> This probably goes without saying, but you'll have to use col =
> md5('blahblahblahblah') in your qualifiers to get the benefit of the
> index.
>
> --brian

Unless the point is to guarantee uniqueness of the "long-long value"s.


pgsql-general by date:

Previous
From: Brian Hirt
Date:
Subject: Re: Values larger than 1/3 of a buffer page cannot be indexed.
Next
From: Jo
Date:
Subject: Postgres 8.3 vs. 8.4 - Query plans and performance