Re: Suggestion on index creation for TEXT data field - Mailing list pgsql-admin

From David G. Johnston
Subject Re: Suggestion on index creation for TEXT data field
Date
Msg-id CAKFQuwYtwQTZeX+buucq4gqSJwL7WQWxU7LvAJ1MEuzZa=KMrg@mail.gmail.com
Whole thread Raw
In response to Suggestion on index creation for TEXT data field  (postgann2020 s <postgann2020@gmail.com>)
Responses Re: Suggestion on index creation for TEXT data field  (postgann2020 s <postgann2020@gmail.com>)
Re: Suggestion on index creation for TEXT data field  (postgann2020 s <postgann2020@gmail.com>)
Re: Suggestion on index creation for TEXT data field  (postgann2020 s <postgann2020@gmail.com>)
List pgsql-admin
On Thu, May 21, 2020 at 7:28 AM postgann2020 s <postgann2020@gmail.com> wrote:
which is having an avg width of 149bytes.

The average is meaningless if your maximum value exceeds a limit.

2. What type of index is the best suited for this type of data?.

And what type of data exactly are we talking about.  "TEXT" is not a useful answer.

If the raw data is too large no index is going to be "best" -  as the hint suggests you either need to drop the idea of indexing the column altogether or apply some function to the raw data and then index the result.

David J.

pgsql-admin by date:

Previous
From: postgann2020 s
Date:
Subject: Suggestion on index creation for TEXT data field
Next
From: postgann2020 s
Date:
Subject: Suggestion on column cast automatically to data type