Re: [sqlite] Performances problem with multi-table query ?

2005-04-23 Thread Tom Poindexter
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: >

Re: [sqlite] Performances problem with multi-table query ?

2005-04-23 Thread D. Richard Hipp
On Sat, 2005-04-23 at 14:25 +0200, Pierre D. wrote: > I'm trying some "simple" query. The first query is "Whose file is it ?" > Here is my first SQL query for that (ran with the sqlite3 command) : > sqlite> SELECT p.name FROM packages p, files f WHERE f.pkgid=p.pkgid AND > f.filename="/usr/bin/gcc

Re: [sqlite] Performances problem with multi-table query ?

2005-04-23 Thread Pierre D.
Le Samedi 23 Avril 2005 14:50, Tobias Rundström a écrit : > [EMAIL PROTECTED] wrote: > > Le Samedi 23 Avril 2005 14:34, Tobias Rundström a écrit : > >>select p.name from packages p join files f on f.pkgid = p.pkgid where > >>f.filename="/usr/bin/gcc"; > > > > It is as slow as the previous query :(

Re: [sqlite] Performances problem with multi-table query ?

2005-04-23 Thread Tobias Rundström
[EMAIL PROTECTED] wrote: Le Samedi 23 Avril 2005 14:34, Tobias Rundström a écrit : select p.name from packages p join files f on f.pkgid = p.pkgid where f.filename="/usr/bin/gcc"; It is as slow as the previous query :( Poor indexes? make sure that you have a index on pkgid in both tables and one f

Re: [sqlite] Performances problem with multi-table query ?

2005-04-23 Thread pinaraf
Le Samedi 23 Avril 2005 14:34, Tobias Rundström a écrit : > Pierre D. wrote: > > Hi > > > > I'm currently developing a package manager (for linux) (yes I know, yet > > another, useless...) and I'm using XML files for the database. But the > > problem of that way is the slowdown and the memory cost

Re: [sqlite] Performances problem with multi-table query ?

2005-04-23 Thread Tobias Rundström
Pierre D. wrote: Hi I'm currently developing a package manager (for linux) (yes I know, yet another, useless...) and I'm using XML files for the database. But the problem of that way is the slowdown and the memory cost of xml files + XPath query So I'm exploring other ways to store the database.

[sqlite] Performances problem with multi-table query ?

2005-04-23 Thread Pierre D.
Hi I'm currently developing a package manager (for linux) (yes I know, yet another, useless...) and I'm using XML files for the database. But the problem of that way is the slowdown and the memory cost of xml files + XPath query So I'm exploring other ways to store the database. The first other