db: add spatial index on links