Re: [sqlite] DELETEs using a range from an indexed column

2008-09-22 Thread Tomas Lee
On 2008 September 16 (Tue) 07:12:02am PDT, "Jay A. Kreibich" <[EMAIL PROTECTED]> wrote: > On Mon, Sep 15, 2008 at 10:57:37PM -0700, Tomas Lee scratched on the wall: > >> I want to delete the 1000 members with the lowest scores. Assume that >> it is extremely unlikely for two members to have

Re: [sqlite] DELETEs using a range from an indexed column

2008-09-16 Thread Jay A. Kreibich
On Mon, Sep 15, 2008 at 10:57:37PM -0700, Tomas Lee scratched on the wall: > I want to delete the 1000 members with the lowest scores. Assume that > it is extremely unlikely for two members to have identical scores. > Also, the 1000 is arbitrary -- it could be more or less on different > days.

[sqlite] DELETEs using a range from an indexed column

2008-09-16 Thread Tomas Lee
I have this schema: CREATE TABLE members (uid INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, score INTEGER); CREATE INDEX members_score_index ON log (score); I want to delete the 1000 members with the lowest scores. Assume that it is extremely unlikely for two members to have identical