On 5 Feb 2012, at 7:48pm, Sherief Farouk wrote:

> Just like the title says, a query on my database returns almost instantly as 
> soon as I remove the ORDER BY primary key column clause

> SELECT TweetID, UserID, Text FROM Tweets WHERE UserID IN (SELECT UserID FROM 
> Users) AND TweetID <= 1234  LIMIT 100


> SELECT TweetID, UserID, Text FROM Tweets WHERE UserID IN (SELECT UserID FROM 
> Users) AND TweetID <= 1234  ORDER BY TweetID DESC  LIMIT 100

Can you show us the CREATE statement for the table ?  Preferably, dig it out of 
sqlite_masters:

SELECT * FROM sqlite_masters;

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to