From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: Optimizing pg_trgm makesign() (was Re: WIP: Fast GiST index build) |
Date: | 2011-09-29 21:20:47 |
Message-ID: | CAPpHfdsc0k5wH6NjnfcN1ZRu5TXYxEhu4PSXOQmdrRjO2eds2A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Sep 30, 2011 at 1:08 AM, Heikki Linnakangas <
heikki(dot)linnakangas(at)enterprisedb(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2011-09-29 21:22:34 | Re: fix for pg_upgrade |
Previous Message | Tom Lane | 2011-09-29 21:20:39 | Re: pg_upgrade - add config directory setting |