Re: [sqlite] Why sqlite3 running at different time can have very different speed?

2019-10-20 Thread Simon Slavin
On 20 Oct 2019, at 12:36pm, Peng Yu wrote: > I am on Mac OS X. Is there anything equivalent? Thanks. Have the database stored on a Flash Drive. Eject (or unmount) the Flash Drive. Works on all versions of all operating systems. ___ sqlite-users

Re: [sqlite] Why sqlite3 running at different time can have very different speed?

2019-10-20 Thread Peng Yu
> You can try clearing Linux file system cache to convince > yourself that cache misses contributes to performance drop. > > Run this as root: > > # sync; echo 3 > /proc/sys/vm/drop_caches I am on Mac OS X. Is there anything equivalent? Thanks. -- Regards, Peng

Re: [sqlite] Why sqlite3 running at different time can have very different speed?

2019-10-20 Thread Simon Slavin
On 20 Oct 2019, at 1:54am, Peng Yu wrote: > How to prove the large time difference of sqlite3 is indeed due to > cache and where is the cache? Keep the database on an external drive (e.g. USB Flash drive). Unmount the drive to be sure that the cache has been cleared. > Why the caching used

Re: [sqlite] Why sqlite3 running at different time can have very different speed?

2019-10-19 Thread Dominique Pellé
Peng Yu wrote: I have never seen such a dramatic difference in non-sqlite3 > operations. For example, cat has some difference but is ~13%. > > $ time cat file.sqa > /dev/null > > real0m7.282s > user0m0.067s > sys0m2.371s > $ time cat file.sqa > /dev/null > > real0m6.316s > user

Re: [sqlite] Why sqlite3 running at different time can have very different speed?

2019-10-19 Thread Keith Medcalf
On Saturday, 19 October, 2019 18:55, Peng Yu wrote: >I have never seen such a dramatic difference in non-sqlite3 >operations. For example, cat has some difference but is ~13%. Have you been looking? >$ time cat file.sqa > /dev/null > >real0m7.282s >user0m0.067s >sys0m2.371s >$

Re: [sqlite] Why sqlite3 running at different time can have very different speed?

2019-10-19 Thread Peng Yu
I have never seen such a dramatic difference in non-sqlite3 operations. For example, cat has some difference but is ~13%. $ time cat file.sqa > /dev/null real0m7.282s user0m0.067s sys0m2.371s $ time cat file.sqa > /dev/null real0m6.316s user0m0.062s sys0m2.319s How to

Re: [sqlite] Why sqlite3 running at different time can have very different speed?

2019-10-19 Thread Keith Medcalf
On Saturday, 19 October, 2019 18:05, Peng Yu wrote: Looks like the difference between reading from disk and reading from cache. >I see that sqlite3 can be very different in terms of run time. >$ time sqlite3 file.sqa -Atv > /dev/null > >real0m3.259s >user0m0.193s >sys0m0.704s >$