Gerry Snyder <mesmerizer...@...> writes: ... > The changes were to use the real column names and not the aliases from the > SELECT clause. > > I believe the problem arises (and the book "Using SQLite" explains it a lot > better than I can) because the FROM and WHERE clauses are executed before > the SELECT clause. I can not explain why the absence or presence if an INDEX > changes the result.
Hi Gerry, Thanks for your response, but unfortunately it does not solve the problem. Changing the query as you suggested ('entry_types_name' => 'entry_type.name') still does not provide any results when the index exists, although it seems to -- but please note that the query you posted includes a mistake, most likely a typo: (entry_types.name = 'cli_command' AND entry_type_name IN ... Instead of: (entry_types.name = 'cli_command' AND entry_id IN ... So, we're back where we started. Regards, -- Gavrie _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users