On Fri, Sep 30, 2011 at 1:08 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
At every call, gtrgm_penalty() has to calculate the signature for newitem, using makesign(). That's an enormous waste of effort, but there's currently no way gtrgm_penalty() to avoid that. If we could call makesign() only on the first call in the loop, and remember it for the subsequent calls, that would eliminate the need for any micro-optimization in makesign() and make inserting into a trigram index much faster (including building the index from scratch)
Isn't it possible to cache signature of newitem in gtrgm_penalty like gtrgm_consistent do this for query?
------
With best regards,
Alexander Korotkov.