boysen wrote:
> 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;
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]