On 31 May 2017, at 8:31pm, Thomas Flemming <t...@qvgps.com> wrote:

> Copying just the ids from 12mio records ordered in a temp-table takes 60 
> seconds. There is a COLLATE NOCASE index on label.
> 
> Is this normal or can this also be done faster?
> 
> DROP TABLE IF EXISTS RowCursor;
> CREATE TEMP TABLE RowCursor (Id int);
> INSERT INTO RowCursor SELECT Id from Pois ORDER BY Label COLLATE NOCASE;
> CREATE INDEX RowCursor_Id on RowCursor(Id);

Please confirm that you are using the SQLite command-line shell to perform 
these timings.

It is faster and more space-efficient to combine two of the above commands into

        CREATE TEMP TABLE RowCursor (Id INTEGER PRIMARY KEY);

Can you tell me how long it takes to execute just

        SELECT Id from Pois ORDER BY Label COLLATE NOCASE;

?  Also, can you post the CREATE TABLE command for the table Pois ?

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

Reply via email to