Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试创建一个使用三元组进行近似字符串匹配的应用程序。现在所有记录都在数据库中,我希望能够搜索固定列上的记录。最好有一个附加字段,其中包含我要搜索的值的散列版本(如果是,存储它的最佳方法是什么?)还是动态生成三元组更好?
您使用的是哪个数据库?
PostgreSQL 有内置的 trigram 函数,可以使用 GiST 或 GiN 索引。
在 SQL 中,我使用 CLR 来创建和比较三元组,其工作速度比 SQL 代码快得多。