There is no transfer_table_new in that database. Or any view named "transfer" anything.
So what query are you running on this one? Here's all the VIEWs. CREATE VIEW current_flock_owner AS SELECT latest.flock_no, latest.owner_person_id, latest.ow FROM flock_owner even_later WHERE latest.flock_no = even_later.flock_no AND latest.owner_c CREATE VIEW original_flock_owner AS SELECT first.flock_no, first.owner_person_id, first.owne OM flock_owner even_earlier WHERE first.flock_no = even_earlier.flock_no AND first.owner_ch CREATE VIEW three_gen_ped AS SELECT s.regn_no, s.sire_no, s.dam_no, g1.sire_no AS gs1, g1.da 1, gg1.dam_no AS ggd1, gg2.sire_no AS ggs2, gg2.dam_no AS ggd2, gg3.sire_no AS ggs3, gg3.dam IN sheep g1 ON s.sire_no = g1.regn_no JOIN sheep g2 ON s.dam_no = g2.regn_no JOIN sheep gg1 o JOIN sheep gg3 ON g2.sire_no = gg3.regn_no JOIN sheep gg4 ON g2.dam_no = gg4.regn_no; CREATE VIEW two_gen_ped AS SELECT s.regn_no, s.sire_no, s.dam_no, g1.sire_no AS gs1, g1.dam_ ep g1 ON s.sire_no = g1.regn_no JOIN sheep g2 ON s.dam_no = g2.regn_no; CREATE VIEW current_ear_tag as CREATE VIEW original_ear_tag as CREATE VIEW current_eid as CREATE VIEW current_inspection as CREATE VIEW current_prp as CREATE VIEW sheep_data as CREATE VIEW sheep_basic_data as CREATE VIEW sheep_progeny_data as 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 11:54 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 17:05: > What version are you using? Can you extract an example of all your > tables/indexes/data to demonstrate? I'm on 3.7.11 (Arch-Linux). You can grab a database at http://www.somborneshetlands.co.uk/things/sss-test-nomem.zip You will need to use a regn_no of 023674 with that as its a cut down data set for testing (the live one is 35MB). The date can remain the same. > > 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? AFAIK you can't create indexes on a view, or can you? 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