I've discovered that the ANALYZE command is extremely slow on my large 
databases. I read the documentation and it says that the command should be 
issued when the schema is changed "a lot". Hmm, when exactly could that be? 
Currently, I issue the command every time I have inserted ~1000 rows in my main 
table.
 
Now I'm thinking of using precomputed sqlite_stat1 and sqlite_stat2 tables, 
since the relationship between my tables is pretty much (say 95%) constant in 
all database instances. I'm wondering the same as John did here: 
http://osdir.com/ml/sqlite-users/2009-02/msg00298.html

1) Will this work?
2) Is it "dangerous"? e.g. could this completely confuse the query optimiser, 
or is it the case that as long as the hard coded values are "realistic" it 
doesn't matter that they don't reflect the reality of the table (which is what 
the docs imply)?
2) Has anyone experience of trying this?

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

Reply via email to