News for hackers. Stuff that matters.
Re:Optimizing Large-Scale OpenStreetMap Data with SQLite by simonw on Saturday July 06, 2024 @12:44PM (#40891535)
I liked the trick used here for speeding up tag key/value queries using a FTS index:

    SELECT id
    FROM entries e
    JOIN search s ON s.rowid = e.id
    WHERE
    -- use FTS index to find subset of possible results
    search MATCH 'amenity cafe'
    -- use the subset to find exact matches
    AND tags->>'amenity' = 'cafe';
Re:Optimizing Large-Scale OpenStreetMap Data with SQLite by jtarchie on Monday July 08, 2024 @10:56AM (#40906000)
At first, I didn't do it, but I had that shower thought of "What If?"

It worked! It was super helpful in finding more accurate results.