On 14-12-2018 11:22, Simon Slavin wrote:
On 14 Dec 2018, at 10:15am, Luuk <luu...@gmail.com> wrote:

why do i get 'no collation sequence' with this statement:

sqlite> select Folder_Path from Folder;
Error: no such collation sequence: NoCaseUnicode
There's a UNIQUE index for Folder_Path COLLATE NoCaseUnicode.  Iterating 
through that index would involve processing less data than reading the entire 
table.  So SQLite decides that using that index to complete your SELECT command 
is a good strategy.  But that collation is not included in the default 
compilation of SQLite so SQLite realises it can't use that index.

Simon.

OK, but a slightly different statement, which needs to scan the complete table, also returns the error:

sqlite> explain query plan select Folder_Path from Folder order by upper(Folder_Path);
Error: no such collation sequence: NoCaseUnicode
sqlite> explain query plan select upper(Folder_Path) from Folder order by upper(Folder_Path);
Error: no such collation sequence: NoCaseUnicode

My conclusion would be that this is a bug (in the definition of the table, no in SQLite).

Or, but i double it will make sence,

When SQLite realises it can't use that index, should it revert to a full table scan?

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to