例如,如果我有这些记录
单词
AAA
AAB
AAC
BAA AA
对于普通表,我将使用类似于
select * from table where word like 'AA%'order by H collate nocase asc如何使用FTS3表进行选择?另外,我想知道使用这种查询FTS3是否仍然具有比普通表更好的性能?
发布于 2014-12-09 12:27:50
如何使用FTS3表进行选择?
引用文献资料
可以查询FTS表中包含指定术语的所有文档(上述简单情况),也可以查询包含具有指定前缀的术语的所有文档。正如我们所看到的,特定术语的查询表达式只是术语本身。用于搜索术语前缀的查询表达式本身就是前缀本身,前缀上附加了“*”字符。
文件还提供了一个示例:
-- Query for all documents containing a term with the prefix "lin". This will match
-- all documents that contain "linux", but also those that contain terms "linear",
--"linker", "linguistic" and so on.
SELECT * FROM docs WHERE docs MATCH 'lin*';https://stackoverflow.com/questions/27378931
复制相似问题