From: Adrian Klaver <adrian.klaver@aklaver.com>
To: postgann2020 s <postgann2020@gmail.com>
To: pgsql-admin@postgresql.org
To: pgsql-general@postgresql.org
To: pgsql-performance@postgresql.org
Subject: Re: Suggestion on index creation for TEXT data field
Date: Thu, 21 May 2020 07:45:26 -0700
Message-ID: <bc55c38c-7029-9b76-c7a9-de9c67ed953f@aklaver.com> (raw)
In-Reply-To: <CANynezMUb3xF4Tuj5a4CH+BYNkPxfAQR3qg5ExRTuuWc8veRJg@mail.gmail.com>
References: <CANynezMUb3xF4Tuj5a4CH+BYNkPxfAQR3qg5ExRTuuWc8veRJg@mail.gmail.com>
On 5/21/20 7:27 AM, postgann2020 s wrote:
> Hi Team,
> Thanks for your support.
> Could you please suggest on below query.
>
> Environment
>
> PostgreSQL: 9.5.15
> Postgis: 2.2.7
> Mostly table contains GIS data and we are trying to creating an index on
> the column which is having an avg width of 149bytes.
>
> CREATE INDEX index_idx
> ON SCHEMA.TABLE
> USING btree
> (column);
>
> ERROR: index row size 2976 exceeds maximum 2712 for index "index_idx"
> 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.^^^^^^^^^^^^^^^^^^^^^^
Hint supplies answer to 1) and 2) below.
>
> Could you please suggest on below queries.
> 1. How to solve the issue?.
> 2. What type of index is the best suited for this type of data?.
>
> Thanks for your support.
>
> Regards,
> PostgAnn.
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: adrian.klaver@aklaver.com, postgann2020@gmail.com, pgsql-admin@postgresql.org, pgsql-general@postgresql.org
Subject: Re: Suggestion on index creation for TEXT data field
In-Reply-To: <bc55c38c-7029-9b76-c7a9-de9c67ed953f@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox