Re: [sqlite] Table modifications and analyze

2008-04-14 Thread D. Richard Hipp

On Apr 14, 2008, at 2:49 PM, Petite Abeille wrote:
> Hello,
>
> What heuristics do people use to determine the frequency for analyzing
> their indices?
>

I use the simple heuristic of never running ANALYZE.  The ANALYZE  
command
is only helpful to the optimizer in certain extreme cases.  See, the  
discussion at

 http://www.sqlite.org/cvstrac/wiki?p=QueryPlans

If you have an application where SQLite chooses a bad query plan by  
default,
you can probably get by with running ANALYZE just once on a typical  
database,
then copying the resulting sqlite_stat1 table into every new database  
you create
with the same schema.

Some database engines benefit from running ANALYZE periodically.  SQLite
does not, in general.

D. Richard Hipp
[EMAIL PROTECTED]



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


[sqlite] Table modifications and analyze

2008-04-14 Thread Petite Abeille
Hello,

What heuristics do people use to determine the frequency for analyzing  
their indices?

Is there something equivalent to user_tab_modifications that keep  
tracks of the number of inserts, updates and deletes for each table?

Thanks in advance.

Kind regards,

--
PA.
http://alt.textdrive.com/nanoki/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users