On May 8, 2009, at 3:31 PM, ioannis wrote:

> I would like to clarify my understanding in regards to lifespan of  
> indexes.
>
> 1. Once the index is created, the sequence of the items is stored in  
> the
> database, so the following example would be possible.
> a) Create an index with an overloaded NOCASE collation function on a  
> column.
> b) Sort the column with NOCASE, without loading the overloaded NOCASE
> collation extension.
> c) The sorting is expected to follow the sequence created initially  
> by the
> overloaded collation function and not the standard function.
>
> 2. I am a bit unclear what happens to an already created index once i
> INSERT, UPDATE, DELETE a row in an indexed column.
> 3. When is a REINDEX required (except when collation function  
> changes) ?


I don't really understand your question.  But I think the answer might  
be captured in these facts:

*  Whenever you change a collating function (by overloading it) you  
must run REINDEX before doing any INSERT, UPDATE, or DELETE operations  
or you will might corrupt the database file.

* The only time you should ever need to run REINDEX is after changing  
a collating function.


D. Richard Hipp
[email protected]



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to