Re: [sqlite] Undesired query plan when using GROUP BY

2009-09-14 Thread Pavel Ivanov
> My guess is that > sqlite isn't built to understand that word_id is unique (i.e. GROUP BY > is guaranteed to do absolutely nothing in this case). SQLite is not smart enough to guess these things. And in fact I doubt that any database is smart enough to guess such things. So I'd suggest you to ch

[sqlite] Undesired query plan when using GROUP BY

2009-09-13 Thread George Bills
Hi all, I was wondering if someone here could help me with understanding / solving an sqlite problem I'm having. Any help would be appreciated. =SCHEMA= CREATE TABLE pop_words_wpk ( word_id INTEGER PRIMARY KEY, occurrences INTEGER ); CREATE INDEX pop_words_wpk_oidx ON pop_words_wpk(occur