Re: [Haskell-cafe] Takusen sqlite3 insert is very slow

2010-03-26 Thread David Sankel
This FAQ on the sqlite website seems relevant: http://www.sqlite.org/faq.html#q19 David On Wed, Mar 24, 2010 at 5:34 PM, Vasyl Pasternak wrote: > Hi Jason, > > Your recommendations worked for me. When I enclosed updating into > single transaction, the code executed in less than 0.5 seconds, whi

Re: [Haskell-cafe] Takusen sqlite3 insert is very slow

2010-03-24 Thread Vasyl Pasternak
Hi Jason, Your recommendations worked for me. When I enclosed updating into single transaction, the code executed in less than 0.5 seconds, which is as fast as HDBC version. I didn't go deeper, hoping, that everything will be OK from now. Thank you, Vasyl 2010/3/20 Jason Dagit : > > > On Sat, Ma

Re: [Haskell-cafe] Takusen sqlite3 insert is very slow

2010-03-21 Thread Leon Smith
Using PostgreSQL on my computer, your code executes in 3.5 seconds with GHCi, while compiled it executes in 16.2 seconds! Clearly something is wrong, although I don't yet know enough about Takusen enough to be able to say what. I tried hoisting the preparation of the statement out of the loop

Re: [Haskell-cafe] Takusen sqlite3 insert is very slow

2010-03-20 Thread Jason Dagit
On Sat, Mar 20, 2010 at 3:32 AM, Vasyl Pasternak wrote: > Hi Cafe, > > I have another problem, please look at code: > > storeInDb = withSession (connect "test.db") > (do > execDDL (sql "create table x (y int)") > forM_ ([1..1] :: [Int]) >

[Haskell-cafe] Takusen sqlite3 insert is very slow

2010-03-20 Thread Vasyl Pasternak
Hi Cafe, I have another problem, please look at code: storeInDb = withSession (connect "test.db") (do execDDL (sql "create table x (y int)") forM_ ([1..1] :: [Int]) (\x -> do execDML (cmdbind ("insert int