DB-Type: PostgreSQL DB-Version: 11 We have a column which has a single word as a value always. The maxlength is 10 chars.
We always have unique value for this column in the table.
We do not have any updates to this column, only new rows are inserted with this column.
We would like to enable like queries for this column.
Should we consider the PostgreSQL TRGM extension and using a GIN index? or will a normal index suffice in this case?
The queries will be like this:
select * from my_table where my_column like '%abc%';
The question arrives from the fact that TRGM is quite powerful when full text search is required for a long text with many words, but wanted to know if it will be better than a normal index for the single word scenario also.