Do things improve any if you increase the temporary cache size?
Compile with -DSQLITE_DEFAULT_TEMP_CACHE=1000000 or something?

How much memory does the [sort] process consume in the shell
version? What percentage of records are being trimmed by the
first [uniq] in the pipeline?

Dan.

On Jul 29, 2008, at 1:26 PM, Robert Citek wrote:

> Was doing some DB operations and felt they were going slower than they
> should.  So I did this quick test:
>
> $ time -p sqlite3 sample.db 'select foo from bar ; ' | uniq | sort |
> uniq | wc -l
> 2000009
> real 5.64
> user 5.36
> sys 1.51
>
> $ time -p sqlite3 sample.db 'select count(distinct foo) from bar ; '
> 2000009
> real 29.71
> user 26.09
> sys 1.32
>
> Why the difference in time?
> What can I do to make the DB operate closer to the times within the  
> shell?
>
> Regards,
> - Robert
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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

Reply via email to