On 11/13/2013 10:13 PM, Igor Korot wrote:
What I don't understand is:

All fields in WHERE clause are declared as primary/foreign keys. And
it still gives full table scan on the first iteration.

Defining a foreign key doesn't create any indexes, and doesn't in any way affect the behavior of SELECT statements.

Also is it checking conditions from left to right or right to left?

Who is checking which conditions?

Meaning the first row in the plan indicate equality against
scorehits/scorepitch.scoreid, right?

The first row in the plan is SCAN TABLE. It visits every row in the table, regardless of any equality of anything to anything else.
--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to