Re: [sqlite] Foreign Keys and Indexes

2009-05-28 Thread s . breitholz
> s.breith...@staubli.com wrote: > > So when I have a query over serveral tables normally the primay key > > is set as index when the table is joined. > > Only if you actually join on primary key column(s). Doing so is common, > but not mandatory. > > > If I need to add a where > > clause > >

Re: [sqlite] Foreign Keys and Indexes

2009-05-27 Thread Igor Tandetnik
s.breith...@staubli.com wrote: > So when I have a query over serveral tables normally the primay key > is set as index when the table is joined. Only if you actually join on primary key column(s). Doing so is common, but not mandatory. > If I need to add a where > clause > to a field of the

Re: [sqlite] Foreign Keys and Indexes

2009-05-27 Thread s . breitholz
> s.breith...@staubli.com wrote: > > Now I noticed that the speed of selects are much faster with fields > > that are indexed > > Well, that's pretty much the point of having an index in the first > place. Why do you find this fact surprising? Because the indexed field that improved my program

Re: [sqlite] Foreign Keys and Indexes

2009-05-27 Thread Igor Tandetnik
s.breith...@staubli.com wrote: > Now I noticed that the speed of selects are much faster with fields > that are indexed Well, that's pretty much the point of having an index in the first place. Why do you find this fact surprising? > I´ve read that only one index is used per where (I think join