Page MenuHomePhabricator

Track number of Wikidata IDs in geo database
Closed, DeclinedPublic

Description

It might be good to track how many items have wikidata IDs in the osm database. This will tell us if we need to invest any efforts into this.

SELECT COUNT(DISTINCT tags->'wikidata') FROM planet_osm_polygon WHERE tags ? 'wikidata';
-- Result: 39757

This post suggests that this query would be faster, but I am not sure - it seems once the query is cached, it is almost instantenious in both cases:

SELECT COUNT(*) FROM (SELECT DISTINCT tags->'wikidata' as wikidata FROM planet_osm_polygon WHERE tags ? 'wikidata') AS tmp;

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
MaxSem subscribed.

Performance almost doesn't matter because we have a copy in tool labs. Almost because I've seen weird query plans from it.

Only if they have the same index as we have in production - that only contains items with wikidata id present.

Mholloway subscribed.

Since there's no product support for maps now, I don't see any use case for this. We can reopen if that changes in the future.