[EMAIL PROTECTED] wrote:
explain query plan select * from test where rowid in (select rowid
from test where
name like "b%" union all select rowid from test where email like
"b%"); 0|0|TABLE test USING PRIMARY KEY
0|0|TABLE test WITH INDEX test_name
0|0|TABLE test WITH INDEX test_email

But why PRIMARY KEY is used before indexes? Or it isn't?

All three are used sort of simultaneously. If you want to know what's really going on, use "explain" instead of "explain query plan". See http://sqlite.org/opcode.html .

And also I do have an "id integer primary key autoincrement" column
in my table. So if in SQLite "rowid" can be used, "id" column is not
needed any more?

rowid and id are now synonyms - two names for the same column. You can use either name.

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to