Marc L. Allen wrote, On 26/04/12 15:57:
What indexes are on the underlying tables?
There are indexes on all the fields used in the tables of the
transfer_history view.
While tinkering I have discovered something:
If instead of
SELECT transfer_date FROM transfer_history_new
WHERE regn_no = '039540' and transfer_date <= '2012-05-01'
order by transfer_date asc
I write
SELECT * FROM transfer_history_new
WHERE regn_no = '039540' and transfer_date <= '2012-05-01'
order by transfer_date asc
then I get an execution time of a couple of milliseconds instead of
300ms or so (times from Sqliteman this time). The planner has reverted
to using indexes instead of scans...
--
Peter Hardman
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users