Nikolaus Rath wrote: > When running apswtrace on my Python program, I got the following > output: > > LONGEST RUNNING - AGGREGATE > > 16638 11.041 UPDATE inodes SET size=MAX(size,?), ctime=?, mtime=? > WHERE id=? 16638 0.938 SELECT s3key FROM inode_s3key WHERE inode=? > AND offset=? > > i.e. both statements were executed 16638 times, but execution of the > first took 11 seconds in total and execution of the second only 0.9 > seconds.
Select likely gets data from in-memory cache. Update has to physically write to disk. Memory is much faster than disk. If at all possible, group write operations together into a transaction. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users