vita...@yourcmc.ru wrote: > SELECT * FROM bugs b LEFT JOIN profiles p ON p.userid=b.assigned_to WHERE > p.login_name='vita...@yourcmc.ru' > > Query plan: > SCAN TABLE bugs AS b > SEARCH TABLE profiles AS p USING INTEGER PRIMARY KEY (rowid=?) > > Which is of course very slow. > > Maybe you'll fix it in later sqlite versions?
To find bugs that do not have a matching profiles row, the database always must go through the entire bugs table. The WHERE expression then makes the outer join meaningless, but SQLite's query optimizer does not protect you from the consequences of writing inconsistent queries; if you don't want an outer join, omit the LEFT in the first place. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users