I am optimizing the search query in the Postgres database. The query uses the unaccent function. I want to create a gin-index to make the search query faster. So I had gone through some articles on faking the stable function as an immutable function using wrapper functions. I was thinking of creating a new column for precomputed unaccented texts would be good. But I got to know that the unaccent function can produce different outputs. So what is the preferred way? Precomputation or using a wrapper function to deceive the program?
Asked
Active
Viewed 129 times