Re: [sqlite] SQLite omit using index

2008-01-24 Thread Alexander Batyrshin
As usual your answer is perfect in explanation! Thank you very much. On Jan 24, 2008 2:49 AM, <[EMAIL PROTECTED]> wrote: > "Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > > Hello All, > > I've found that SQLite-3.5.4 doesnt use index in this situation: > > > > sqlite> create table t1 (id int p

Re: [sqlite] SQLite omit using index

2008-01-23 Thread drh
"Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > Hello All, > I've found that SQLite-3.5.4 doesnt use index in this situation: > > sqlite> create table t1 (id int primary key, val int); > sqlite> create table t2 (id unique, val int primary key); > sqlite> explain query plan update t1 set val = (

[sqlite] SQLite omit using index

2008-01-23 Thread Alexander Batyrshin
Hello All, I've found that SQLite-3.5.4 doesnt use index in this situation: sqlite> create table t1 (id int primary key, val int); sqlite> create table t2 (id unique, val int primary key); sqlite> explain query plan update t1 set val = (select t2.val from t2 where t1.id = t2.id); 0|0|TABLE t1 0|0