On Tue, 2005-04-19 at 10:27 -0700, Ted Unangst wrote:
> Two tables in a where can use two indices in sqlite?
> 

Correct.  SQLite (and every other SQL RDBMS that I know
of) uses as many as but no more than one index per table
in a join.  If the same table is used more than once in
a join, then each occurrence of that table might employ
a different index.  Separate and independently chosen
indices might also be used for subqueries.

If a particular index contains all of the columns of a
table that a query needs, then SQLite might choose to use
the index only and ignore the table completely.  So SQLite
might end up using more indices than tables.  But the number
of indices used will never exceed the number of tables named
in the query.
-- 
D. Richard Hipp <[EMAIL PROTECTED]>

Reply via email to