Re: [sqlite] Indexes not being used after INNER JOINS?

2008-01-01 Thread Trevor Talbot
On 12/31/07, Hugo Ferreira <[EMAIL PROTECTED]> wrote: > a) It should be completely integrated/embedded within the application; no > separate install. Just a single .DLL ;-) > b) It must have bindings with .Net 2.0 and Mono >1.2.5. > c) Open-Source. On the subject of alternatives, Firebird might

Re: [sqlite] Indexes not being used after INNER JOINS?

2007-12-31 Thread Hugo Ferreira
@Scott: Id is a primary key. I believe PKs always have indexes. @Griggs: While the database engine is to be run on a full blown PC, I have three needs that have lead me to choose SQLite: a) It should be completely integrated/embedded within the application; no separate install. Just a single

Re: [sqlite] Indexes not being used after INNER JOINS?

2007-12-31 Thread Scott Baker
Hugo Ferreira wrote: > Hi everyone, > > I seem to be having a problem here with LEFT JOINS between tables and > results of INNER JOINS. Take for example the following example (table > definition is in the end): > > TABLE COUNT esparqueologico: 750 > TABLE COUNT data: 3828 > TABLE COUNT

Re: [sqlite] Indexes not being used after INNER JOINS?

2007-12-31 Thread Trevor Talbot
On 12/31/07, Hugo Ferreira <[EMAIL PROTECTED]> wrote: > Yes, indeed, it is doing a sequential scan according to EXPLAIN. Still, the > slowness is unbelievable in such a small database. The whole db takes 11Mb, > and doing a LEFT JOIN between a few hundred and a few thousand of rows on a > "Core 2

Re: [sqlite] Indexes not being used after INNER JOINS?

2007-12-31 Thread Hugo Ferreira
Hey! Yes, indeed, it is doing a sequential scan according to EXPLAIN. Still, the slowness is unbelievable in such a small database. The whole db takes 11Mb, and doing a LEFT JOIN between a few hundred and a few thousand of rows on a "Core 2 Duo" taking 6 seconds is... I don't even know what it is

RE: [sqlite] Indexes not being used after INNER JOINS?

2007-12-31 Thread Griggs, Donald
Hello Hugo, If you preceed a SELECT with the string EXPLAIN QUERY PLAN sqlite will make it clear which, if any, indices it would use when running the select. Sqlite, unlike some of the "non-light" databases, uses a maxium of one index per table per select, I believe. You may want to look at