On 31 May 2012, at 6:18pm, Brannon King <notacom...@gmail.com> wrote:
> The Services and Telemetry tables have hundreds of rows, but the Events > table has a million. I can't seem to figure out the right combination of > indexes to get the following queries to all execute quickly. Some indexes > help some queries but hurt others. When I have indexes on TelemetryId and > TimestampTicks the former seems to be favored even when the TimestampTicks > index provides quicker results. When I use the '+' to disable the > TelemetryId index I get some fast and some slow results. Help? I recommend you execute the SQL command ANALYZE then try various of those SELECTs again. This can cause the SQLite optimizer to make different choices about which indexes to use. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users