That fixed the issue I was seeing the first time around, thanks. Still getting some weirdness where it looks like the results are highly dependent on the contents of sqlite_stat1. I've been trying to construct a simplified version to share but am having trouble reproducing it on a smaller scale than the oversize, overcomplicated db I picked to test with.
F:\Data\Temp\Weirdness>sqlite3 orig.sqlite SQLite version 3.18.0 2017-03-28 18:48:43 Enter ".help" for usage hints. sqlite> select sqlite_version(); sqlite_version() 3.18.0 Run Time: real 0.000 user 0.000000 sys 0.000000 sqlite> select sqlite_source_id(); sqlite_source_id() 2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37 Run Time: real 0.000 user 0.000000 sys 0.000000 sqlite> .lint fkey-indexes CREATE INDEX foo --details omitted to protect the innocent... and I guess even the guilty CREATE INDEX bar sqlite> .exit F:\Data\Temp\Weirdness>sqlite3 sameSchema.sqlite SQLite version 3.18.0 2017-03-28 18:48:43 Enter ".help" for usage hints. sqlite> .read schema.sql --same as what the original came from sqlite> .lint fkey-indexes sqlite> analyze sqlite_master; Run Time: real 0.546 user 0.000000 sys 0.000000 sqlite> .lint fkey-indexes sqlite> attach database 'orig.sqlite' as orig; Run Time: real 0.000 user 0.000000 sys 0.000000 sqlite> insert into main.sqlite_stat1 select * from orig.sqlite_stat1; Run Time: real 0.546 user 0.000000 sys 0.000000 sqlite> detach database orig; Run Time: real 0.093 user 0.000000 sys 0.000000 sqlite> .lint fkey-indexes sqlite> analyze sqlite_master; Run Time: real 0.000 user 0.000000 sys 0.000000 sqlite> .lint fkey-indexes CREATE INDEX foo --details omitted to protect the innocent CREATE INDEX bar sqlite> delete from sqlite_stat1; Run Time: real 0.468 user 0.000000 sys 0.015600 sqlite> .lint fkey-indexes CREATE INDEX foo --details omitted to protect the innocent CREATE INDEX bar sqlite> analyze sqlite_master; Run Time: real 0.000 user 0.000000 sys 0.000000 sqlite> .lint fkey-indexes CREATE INDEX foo --details omitted to protect the innocent CREATE INDEX bar CREATE INDEX baz CREATE INDEX qux ... --13 total create index suggestions produced _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users