I have an SQLite query that seems to be skipping an index I created on the field Time:
sqlite> explain query plan SELECT UserID, JSON FROM TweetsJSON WHERE TweetID <= 9999999 AND Time >= 1352249596 AND Time <= 1353027196 ORDER BY TweetID DESC LIMIT 100 ;
0|0|0|SEARCH TABLE TweetsJSON USING INTEGER PRIMARY KEY (rowid<?) (~27777 rows)
TweetID is a primary key and an index was created on Time using the syntax CREATE INDEX TimeTweetsJSONIndex ON TweetsJSON (Time). What's wrong here? Why is it skipping that index totally? Search times are reflecting that and they're less than satisfactory.
sqlite> explain query plan SELECT UserID, JSON FROM TweetsJSON WHERE TweetID <= 9999999 AND Time >= 1352249596 AND Time <= 1353027196 ORDER BY TweetID DESC LIMIT 100 ;
0|0|0|SEARCH TABLE TweetsJSON USING INTEGER PRIMARY KEY (rowid<?) (~27777 rows)
TweetID is a primary key and an index was created on Time using the syntax CREATE INDEX TimeTweetsJSONIndex ON TweetsJSON (Time). What's wrong here? Why is it skipping that index totally? Search times are reflecting that and they're less than satisfactory.