Hi, SELECT TdoIdoc,RdoCart,RdoQuat FROM Tesdoc INNER JOIN Rigdoc ON RdoIdoc BETWEEN TdoIdoc*10000000 AND TdoIdoc*10000000+9999999 WHERE TdoTipo=60 AND TdoAnno BETWEEN 2014 AND 2014 GROUP BY TdoIdoc
When I run this query on 3.8.5 it takes 0.126 seconds, when I run this query on 3.8.7 it takes 17.37 seconds if I change 'INNER JOIN Rigdoc' with 'LEFT JOIN Rigdoc' it takes 0.063 seconds the table Rigdoc have column RdoIdoc as PRIMARY KEY Best regards Luigi. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users