[OSM-dev] Automatic Spell check service
tom at compton.nu
Wed Jan 2 19:32:52 GMT 2008
On 02/01/2008, Stefan de Konink <skinkie at xs4all.nl> wrote:
> Tom Hughes schreef:
> > On 02/01/2008, Stefan de Konink <skinkie at xs4all.nl> wrote:
> >> I wonder if it could be accepted that every day an automatic spell check
> >> script would operate on the database and checks for less common 'name'
> >> tags for automatic spelling corrections.
> >> select name, count(name) AS count from way_tags group by name order by
> >> count, name;
> > That query should only lock the API for an hour or so at a guess.
> In my setup:
> 89696.395 msec resulting in 10434 rows
...this would be a setup that has a name field in way_tags? unlike the
actual live setup which doesn't?
Even a 90 second lockup (and on the live system with other users it
might be longer) is not really acceptable though, and if you use
way_tags then it will be a lockup as that is a MyISAM table.
I just did this on the live system:
select k, count(k) AS count from current_way_tags group by k order by count, k
which I assume is what you meant, and after two minutes I killed it
because it had completely locked the API.
> Yes, it isn't MySQL, don't worry, the machine has 8GB of memory and only
> costed 390 euro. Would it be better if I provide a list of suggestions
> and that this is applied to the database via the API or something faster?
Huh? I thought that was a query you wanted to run on the live
database? Which is a MySQL database...
Tom (who is now very confused about what you are proposing)
Tom Hughes (tom at compton.nu)
More information about the dev