On Wednesday 05 January 2005 13:05, D. Richard Hipp wrote: > Thorsten Schuett wrote: > > have I missed something obvious or is my explanation that bad? > > Your original posting was lengthy and dense. I doubt many people took > the time to read it. Thanks for the kind paraphrase of "hard to read". ;-)
> > Can I make sqlite use a more complex index for the joins? E.g.: > > foreach row_type in type where row_type.mdc_value="MDC_HFN" > > foreach row_parent in parent where row_parent.mdc_value="/tmp/file-test" > > and row_parent.mdc_oid = row_type.mdc_oid > > [...] > > So that the if-statements are converted into index-lookups? > > Create indices as follows: > > CREATE INDEX idx1 ON type(mdc_value); > CREATE INDEX idx2 ON parent(mdc_value, mdc_oid); Damnit. I create such indices but not on all tables. Thanks a lot, Thorsten