--- Robert Simpson <[EMAIL PROTECTED]> wrote:

> > -----Original Message-----
> > From: Nono BEZMan [mailto:[EMAIL PROTECTED] 
> > 
> > Why not integrate a patch like this one
> > (http://www.sqlite.org/cvstrac/tktview?tn=1250) in
> the
> > next cvs. It would awesome for us windows users to
> be
> > able to chose between FILE_FLAG_WRITE_THROUGH and
> > FlushFileBuffers, with a PRAGMA for instance!
> > 
> > I did make the changes in the pacth using 3.3.2 as
> > base (I had to change a few function names +
> change
> > the 'id->' in to 'f.' + did not like '@@ -169,6
> +192,7
> > @@ (..) +  id->writeThru = 0;' so I did apply that
> > change).
> > 
> > Anyways, I went with this solution after
> experiencing
> > extremely slow performance doing multiple simple
> > insterts. I know about the Synchronous=OFF (which
> > works wonders as far as performance), as well as
> using
> > transactions (which also works great, except that
> I
> > have multiple processes using the same database
> and
> > inserting/updating stuff atomically).
> > 
> > Here's the pseudo-code that I used:
> > 
> > - 'CREATE TABLE Test (TestID INTEGER PRIMARY KEY,
> > TestValue INTEGER);'
> > - Do N x 'INSERT INTO Test (TestValue) VALUES
> (1)';
> 
> The critical thing missing from the above pseudo
> code is the transaction
> being started before the loop and committed
> afterwards.  Inside a
> transaction, you can easily get 100,000 inserts/sec
> in SQLite with
> Synchronous=Normal
> 
> Robert
> 
> 
> 

Hi Robert,

Thanx for your answer, but I know about transactions
and I cannot use them in my case... Quote from my
original post:

"I know about the Synchronous=OFF (which
works wonders as far as performance), as well as using
transactions (which also works great, except that I
have multiple processes using the same database and
inserting/updating stuff atomically)."

I do not intend to "bulk" insert rows, since I will
have one process inserting
rows, and another updating/deleting the same rows.
They will work concurently,
so I do not have the luxury of being able to 'begin a
transaction/queue inserts
for x secs/end transaction' here.

My point was that there is light for windows users, if
this
FILE_FLAG_WRITE_THROUGH flag is added to the code.
Otherwise, it seems that
FlushFileBuffers really hinders SLQite to a point it
becomes unusable. '7
Inserts per seconds' on a brand new AMD64 3500+ with
SATA drives is extremely
low, and this could be fixed by using this option,
IMO.

Thanx.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to