> SELECT showing.startTime FROM showing JOIN channel ON  
> showing.startTime >=
> 1239230000 AND showing.stationId = channel.stationId ORDER BY
> showing.startTime LIMIT 8;

I don't know if it would be faster... but I would have written that.

SELECT showing.startTime FROM showing JOIN channel USING (stationId)  
WHERE startTime < 1239230000 ORDER BY startTime LIMIT 8.

Also I know in the latest version of SQLite its possible to 'hint'  
what indexes should be used, which might be helpful.  There is also  
something on the contrib page that lets you check a query to see what  
indexes it does use.

Sorry if the above lacks detail, its kinda a busy day.

--
Ian
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to