【发布时间】:2013-09-12 08:18:33
【问题描述】:
我为在数据库中搜索文本创建了一个虚拟表。
CREATE VIRTUAL TABLE testtable USING FTS3 (
id INTEGER, -- this field have duplicate values
test1 INTEGER,
test2 INTEGER,
test3 TEXT
)
这是一个词,但是当我想搜索特殊 id 时会变得很慢。
我也无法索引“id”字段并出现错误:
virtual tables may not be indexed
想这样搜索:
select * from testtable where id = 48880
如何快速搜索此查询,我在没有 FTS 的情况下快速搜索。
【问题讨论】:
标签: database sqlite full-text-search database-indexes fts3