So I have a table in which one of the columns is used to store data of type string which usually has 10000 characters. When trying to match a particular string it takes a lot of time operationally. Is there any way to reduce it ??
-
1You can use Postgres's plentiful full text search capabilities.Gordon Linoff– Gordon Linoff2020年10月07日 12:13:41 +00:00Commented Oct 7, 2020 at 12:13
1 Answer 1
if you need to optimize select query like this
select *
from tbl
where field_code ilike '%text%'
use gin index
more info here https://hashrocket.com/blog/posts/exploring-postgres-gin-index
Sign up to request clarification or add additional context in comments.
Comments
lang-sql