I suppose that the 50 extra seconds of the first query really have something to do with the initialization of the DB.
Bo
> On my PC the following query requires about 53 seconds: > > select * from TABG a, TABB b > where (a.S='3' or a.S='12 or...) and b.G=a.G order by a.G asc; > > On Oracle with the same scheme and data it requires only 0.4 seconds. >
SQLite does not optimize OR terms in a WHERE clause. Try using an IN operator instead. Like this:
SELECT * FROM tabg AS a, tabb AS b WHERE a.s IN ('3','12',...) AND b.g=a.g ORDER BY a.g ASC;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]