On Tue, Jul 29, 2008 at 1:31 AM,  <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 29, 2008 at 01:26:54AM -0500, Robert Citek wrote:
>> Why the difference in time?
>
> Your first test is only measuring how long sqlite needs to 'select foo from 
> bar';
> all the commands after the pipe are ignored by 'time'.

Are you sure time ignores everything after the pipe?

$ time -p echo | uniq | sort | uniq | wc -l
1
real 0.00
user 0.00
sys 0.00

 $ time -p echo | uniq | sort | uniq | wc -l | sleep 10
real 10.00
user 0.00
sys 0.00

> Try this: time -p sh -c "sqlite3 sample.db 'select foo from bar ; ' | uniq | 
> sort | uniq | wc -l"

$ time -p sh -c "sqlite3 refseq.db 'select foo from bar ; ' | uniq |
sort | uniq | wc -l"
2000009
real 5.76
user 5.35
sys 1.61

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

Reply via email to