On Sep 23, 2008, at 12:06 AM, Robert Simpson wrote:
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Gavin Kistner
>> Sent: Monday, September 22, 2008 9:45 PM
>> To: General Discussion of SQLite Database
>> Subject: [sqlite] Crazy performance difference between Mac and  
>> Windows
>>
>> On my mac laptop at home (2.3GHz Core 2 Duo, 2GB RAM, 5400 RPM drive)
>> this script runs in 22 seconds. In 'better battery life' mode.
>>
>> On my XP desktop at work (2GHz Dual Pentium, 2GB RAM, 7000 RPM drive)
>> this same script on the same DB runs in 11 minutes. 30x slower.
>
> Looks to me like you've forgotten the biggest performance factor of  
> all ...
> starting a transaction before you begin the loop and committing it
> afterwards.

You seem to be right. Wrapping the batches of inserts in a transaction  
took the Mac from 22s to 6s...and Windows from 11m to 20s! With  
journaling enabled and no other cache changes on XP. (Though I'm keen  
to dive further into the Windows-specific suggestions Roger Binns  
posted and see what more they do.)

Thanks for posting the catalyst that made me finally figure out how to  
do transactions with the ORM library. :)
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to