Is it reasonable to guess that sqlite_stat* are used only for NATURAL JOINs and 
other not-so-obvious joins?
 
In my software, the database sometimes grows up to 1-2 GB immediately due to 
the nature of the application. Hence, the guidelines for the ANALYZE command do 
not suffice for me. "Do it once every x months" they say. User chooses to 
import huge amounts of data on regular basis. He is also able to run custom 
queries, which is why I found the sqlite_stat-tables useful.
 
> From: slav...@bigfraud.org
> Date: Mon, 7 Feb 2011 22:43:13 +0000
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Regarding "Manual Control Of Query Plans"
> 
> 
> On 7 Feb 2011, at 9:37pm, Sven L wrote:
> 
> > Thanks for input. So you're saying that creating the tables manually is not 
> > the same as issuing the "ANALYZE" command?
> 
> You have no idea what the ANALYZE command does because it's not documented. 
> For all you know different versions of SQLite put different things in this 
> table. So don't try to simulate it, let SQLite do it. It's hardly difficult: 
> just issue that one instruction. As I wrote upthread, you might want to do it 
> about as often as you'd run the integrity check routine.
> 
> By the way you may be overestimating the impact of doing this. It will matter 
> only in situations where the query optimizer will never have to guess how 
> best to do its searches. If you've created good indexes and specified your 
> WHERE and ORDER BY clauses well, use of this table will be very low. There is 
> definitely little point in doing this until the particular installation has 
> lots of data in its tables ... perhaps after months of having had data 
> entered.
> 
> Simon.
> _______________________________________________
> 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

Reply via email to