The db file is about 3 GB, with 79 entries in the `feeds` table and 6847 entries in the `uris` table. The following query takes way too long --
SELECT u.uri_id uri_id, u.uri uri, u.downloaded_on
FROM fts_uri f
JOIN uris u ON f.uri_id = u.uri_id
JOIN feed_history fh ON u.feed_history_id = fh.feed_history_id
JOIN feeds f ON f.feed_id = f.feed_id
JOIN projects p ON f.project_id = p.project_id
WHERE p.project_id = 3
AND Datetime(u.downloaded_on) >= Datetime(p.project_start)
AND fts_uri MATCH ?
ORDER BY u.uri_id, downloaded_on DESC;
EXPLAIN on the above query is as below, but I don't know how to read EXPLAIN's output. Could one of you suggest on what index I might have to make/use to speed up the query?