On Sat, Apr 23, 2005 at 09:04:18AM -0400, D. Richard Hipp wrote: > On Sat, 2005-04-23 at 14:25 +0200, Pierre D. wrote: > > sqlite> SELECT p.name FROM packages p, files f WHERE f.pkgid=p.pkgid AND > > f.filename="/usr/bin/gcc"; > > Reverse the order of the tables in the FROM clause. Like this: > > SELECT p.name FROM files f, packages p WHERE ...
I'll add a plug for 'idxchk', my small program that reports index usage on queries. See the wiki page at: http://www.sqlite.org/cvstrac/wiki?p=IdxChk I have a small tutorial of rewriting SELECT statements to achieve better performance. The 'idxchk' program is available from: http://sqlite.org/contrib -- Tom Poindexter [EMAIL PROTECTED] http://www.nyx.net/~tpoindex/