I've got a very simple example table and index:

CREATE TABLE DevProps
(
CompID INTEGER NOT NULL,
PropID INTEGER NOT NULL
);

CREATE UNIQUE INDEX Ind_DevProps_CompIDPropID on DevProps (CompID, PropID);

When I check the query plan for this statement:

SELECT CompID FROM DevProps WHERE PropID=33

it looks like it will be doing a table scan.  Why is that?

I would have thought it would not only use the index, but not even need to hit 
the table at all.

Thanks for any insight.

Doug



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

Reply via email to