When querying the table be sure to put the indexed column(s) in the
ORDER BY clause though - otherwise the index won't do you any good. :)

   -T 

> -----Original Message-----
> From: John Stanton [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 05, 2007 9:20 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Sorted index
> 
> B-Tree indices are in sorted sequence.  Just raise an index 
> on the column.
> 
> [EMAIL PROTECTED] wrote:
> > 
> > 
> > I would like to maintain a sorted list of ~3000 entries.
> > I know that I can create a table and the SELECT from it 
> with the ORDER BY clause
> > in order to sort it.
> > However I do not want the overhead of doing this after 
> adding a new entry.
> > It would be good if I could create an index that was 
> sorted, and then when I
> > add a new entry to the table it would automatically be 
> inserted in the index at
> > the correct position.
> > Is this possibe?
> > If not, can anyone suggest any other solution, baring in 
> mind that RAM memory
> > needs to be kep to a minimum?
> > 
> > Thanks
> > Clive
> > 
> > 
> > 
> > 
> --------------------------------------------------------------
> ---------------
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > 
> --------------------------------------------------------------
> ---------------
> > 
> 
> 
> --------------------------------------------------------------
> ---------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> --------------------------------------------------------------
> ---------------
> 
> 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to