Thanks for your replies! They were very helpful!

But is the index updated after each insert/update/delete operation or is
it updated after the transaction containing (many of) these operations
has been committed? That way an insertion of many lines into the
database would take time for index recreation only once, wouldn't it?

best regards
JM




Am Donnerstag, den 22.09.2011, 18:43 +0100 schrieb Simon Slavin:
> On 22 Sep 2011, at 5:30pm, Jay A. Kreibich wrote:
> 
> >  Indexes are updated automatically.
> 
> As they are with all implementations of SQL.  That's why you didn't see it 
> documented: nobody thought there was any question.
> 
> > Note: this means indexes will
> >  speed up queries, but incur a performance penalty for
> >  insert/update/delete operations.
> 
> ... but not much.  I mean, don't expect a single INSERT to take a tenth of a 
> second unless you have a hundred indexes or something.
> 
> >  Stats (see ANALYZE) are *not* updated automatically, so if you are
> >  using those and your table stats are somewhat dynamic, you may need
> >  to re-run ANALYZE.
> 
> ... but again, not much.  But your searches can be pretty fast even if you 
> never use ANALYZE on the database.  And the statistics ANALYZE produces are 
> meant to be a pointer to the nature of your data so unless the type of data 
> you're putting in the database has changed radically there's really not much 
> point in running ANALYZE again.
> 
> 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