I've put ANALYZE in my code before running this SELECT query, I have no change, and now on sqlite3.exe it runs kind of fast every time, even if i close and re open the DB, without ANALYZE statement.
2016-09-07 17:15 GMT+02:00 Laura BERGOENS <laura.bergo...@imerir.com>: > Ok I didn't know abount ANALYZE existence, sorry for that. > > I just run ANALYZE then the query again in sqlite3.exe and this time it > took like half a second. Should I close and re open the DB, cause maybe > this result was influenced with some cache system or something? > > Plus, I ran PRAGMA compile_options for the 3 platforms I mentionned before > and I tried to regroup the results in a libreOffice calc document, I don't > know if that can help or if it's relevant > > 2016-09-07 17:04 GMT+02:00 Simon Slavin <slav...@bigfraud.org>: > >> >> On 7 Sep 2016, at 3:48pm, Laura BERGOENS <laura.bergo...@imerir.com> >> wrote: >> >> > This query takes 100 seconds approx. >> >> Once your tables have some convincing data in (does not need to be final >> data, just something useful to see how the values are distributed), run >> "ANALYZE", just once. It might speed up later SELECTs. It might not. But >> a situation where you have many 'AND' clauses looking at different columns >> is exactly what ANALYZE is most helpful for. >> >> And yes, a 50 kilorow table is not big by SQLite standards. I have >> tables with a thousand times that that yield answers to SELECT in 5ms. >> >> Simon. >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >> > > > > -- > Laura BERGOENS > Technicienne supérieure en Informatique et étudiante à l'IMERIR de > Perpignan > > *Institut Méditerranéen d'Étude etde Recherche en Informatique* > -- Laura BERGOENS Technicienne supérieure en Informatique et étudiante à l'IMERIR de Perpignan *Institut Méditerranéen d'Étude etde Recherche en Informatique* _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users