What version are you using? Can you extract an example of all your tables/indexes/data to demonstrate?
One more idea. Explicitly ask for the indexes...and a compound index might be nice to have around. I dont' think you can ask for more than one index without doing subselects, can you? SELECT transfer_date FROM transfer_history_new INDEXED BY myindex WHERE regn_no = '039540' and transfer_date<= '2012-05-01' order by transfer_date asc Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems ________________________________ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Peter [pe...@somborneshetlands.co.uk] Sent: Thursday, April 26, 2012 10:46 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] Re Query planner creating a slow plan Black, Michael (IS) wrote, On 26/04/12 16:38: > And does this also work? Sounds like the planner isn't seeing all the > columns in the view unless in the select. > > > > SELECT transfer_date,regn_no FROM transfer_history_new > WHERE regn_no = '039540' and transfer_date<= '2012-05-01' > order by transfer_date asc > No, that uses scans as well. I'm tempted to suggest this might be a bug since the pattern seems illogical. Pete -- Peter Hardman _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users