Re: [sqlite] [EXTERNAL] If two orders are both the same order?

2019-05-08 Thread Hick Gunter
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

Re: [sqlite] [EXTERNAL] If two orders are both the same order?

2019-05-07 Thread sqlite
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". >

Re: [sqlite] [EXTERNAL] If two orders are both the same order?

2019-05-06 Thread Hick Gunter
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