Re: [sqlite] 3 tables in relation, really slow ...

2004-09-08 Thread John LeSueur
Andrea Giammarchi wrote: - Original Message - From: "Simon Berthiaume" Have you tried to change the order of the conditions in the WHERE clause? I don't know the internal working of SQLite so they might actualy give worst results. You can try something like that: SELECT date_ext.mydate

Re: [sqlite] 3 tables in relation, really slow ...

2004-09-08 Thread Andrea Giammarchi
- Original Message - From: "Paolo Vernazza" > I would try something like that > > SELECT > date_ext.mydate as MyDate, > city_ext.city as MyCity, > number_ext.mynum as MyNumber > FROM > number_ext JOIN city_ext ON number_ext.city = city_ext.id JOIN > date_ext ON num

Re: [sqlite] 3 tables in relation, really slow ...

2004-09-08 Thread Paolo Vernazza
Andrea Giammarchi wrote: However I've tried to leave mydate search and compare just city_ext and number_ext these two table are very slow with a simple match of one id . Any new ideas ? I would try something like that SELECT date_ext.mydate as MyDate, city_ext.city as MyCity, n

Re: [sqlite] 3 tables in relation, really slow ...

2004-09-08 Thread Andrea Giammarchi
- Original Message - From: "Simon Berthiaume" > Have you tried to change the order of the conditions in the WHERE > clause? I don't know the internal working of SQLite so they might > actualy give worst results. You can try something like that: > > SELECT date_ext.mydate as MyDate, city_e

Re: [sqlite] 3 tables in relation, really slow ...

2004-09-07 Thread Simon Berthiaume
Have you tried to change the order of the conditions in the WHERE clause? I don't know the internal working of SQLite so they might actualy give worst results. You can try something like that: SELECT date_ext.mydate as MyDate, city_ext.city as MyCity, number_ext.mynum as MyNumber FROM city_ext, nu

[sqlite] 3 tables in relation, really slow ...

2004-09-06 Thread Andrea Giammarchi
Hi All, I'm doing some tests with SQLite ( 2.8.14 ) against MySQL ( 4.1.3 beta ) with these 2 tables: date_ext ( id INTEGER PRIMARY KEY, mydate DATE not null ) city_ext ( id INTEGER PRIMARY KEY, city CHAR( 2 ) ) number_ext ( id INTEGER PRIMARY KEY, mydate INTEGER not null, city INTEGER(2) not