"Dennis Volodomanov" <[EMAIL PROTECTED]> wrote: > One more question that I was pondering upon - does the order of rows and > their placement in the table matter at all when using indexes (provided > indexes are used correctly)?
I don't really understand the question... > > Oh, and another :) Would such a statement use both indexes or just one? > > CREATE INDEX indexA on tableA (columnA, columnB, columnC) > SELECT EXISTS (SELECT ROWID from tableA WHERE columnA='a' AND > columnB='b') > The indexA index will be used to resolve the query above, and nothing else. The tableA table is never consulted. To resolve the query above, SQLite does a binary search through indexA looking for an entry that matches columnA and columnB. It then returns 1 or 0 on success or failure. tableA does not come into plan. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------