我在 SQLLite 的三列中设置了一个唯一索引,我想知道是否需要任何其他索引,因为从以下查询中检索结果有时需要将近 10 秒(数据库大小只有大约 25,000 行):
SELECT * FROM books
WHERE (Author="Roger Davies" COLLATE NOCASE AND
Title>="My Best Days" COLLATE NOCASE AND
CatID>"rtYY91" COLLATE NOCASE )
OR Author > "Roger Davies" COLLATE NOCASE
ORDER BY Author COLLATE NOCASE ASC,
Title COLLATE NOCASE ASC,
CatID COLLATE NOCASE ASC LIMIT 10
索引为: CREATE UNIQUE INDEX booksIndex ON books ( CatID, Author, Title )
感谢您的指导。