Re: levenshtein_less_equal (was: multibyte charater set in levenshtein function)

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Subject: Re: levenshtein_less_equal (was: multibyte charater set in levenshtein function)
Date: 2010-10-13 16:23:22
Message-ID: 201010131823.23841.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday 13 October 2010 16:18:01 Alvaro Herrera wrote:
> Excerpts from Tom Lane's message of mié oct 13 10:32:36 -0300 2010:
> > Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > > I spent some time hacking on this. It doesn't appear to be too easy
> > > to get levenshtein_less_equal() working without slowing down plain old
> > > levenshtein() by about 6%.
> >
> > Is that really enough slowdown to be worth contorting the code to avoid?
> > I've never heard of an application where the speed of this function was
> > the bottleneck.
>
> What if it's used on a expression index on a large table?
Its hard to use it as an sensible expression index, given that you use it to
calculate difference between two strings.

Whats more important is, that its used for sorting the results of a query -
where its more important that its fast.

Andres

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-13 16:27:27 Re: SQL command to edit postgresql.conf, with comments
Previous Message Robert Haas 2010-10-13 16:18:08 Re: leaky views, yet again