I take it that AN is the primary key of table ART.
The query shown has 2 possible solutions:
a) SCAN table ART, then SEARCH table XPOST on (GNAME=?,AN=?,TIME>=?)
b) SEARCH table XPOST on (GNAME=?), check if TIME matches, SEARCH table ART on
(AN=?)
Plan a means a full table scan of ART in the
sqlite-users@mailinglists.sqlite.org wrote:
> Your schema implies that there can be more than one TIME for any GNAME and AN
> combination (otherwise the primary key would not need to include alle three
> fields). This contradicts your statement that AN and TIME are "the same
> order".
>
Your schema implies that there can be more than one TIME for any GNAME and AN
combination (otherwise the primary key would not need to include alle three
fields). This contradicts your statement that AN and TIME are "the same order".
(consider the tuples ("T1",1,1) and ("T2",1,2); the AN field
3 matches
Mail list logo