[OSM-dev] Automatic Spell check service

Tom Hughes tom at compton.nu
Wed Jan 2 19:02:18 GMT 2008


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.

> ...or more advanced:
> select way, name from way_tags where name = ( select name from way_tags
> group by name having count(name) = 1);

While that one will probably lock it forever more given the general
uselessness of the MySQL optimiser when given anything involving a
subquery.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the dev mailing list