"Fabio Durieux Lopes" <[EMAIL PROTECTED]> wrote:
> 
> I've seen people saying one should use transactions....
> [B]ut my question is: If I'm using the same binary on 
> both computers shouldn't I get similar performances on
> both computers?
> 

INSERT is very fast in SQLite.  What is slow is not
the INSERT but the implied COMMIT that occurs after
each INSERT if you do not have an explicit transaction.
The COMMIT does not return until all data has been
safely written to the disk platter.  This typically
takes two complete rotations of the disk platter, which
means you can do no more than about 60 COMMITs per
second on your average computer.  In contrast, you
should be able to do 60000 INSERTs/second.

SQLite uses the fsync() system call to make sure
data has reached the disk before continuing.  But
fsync() is busted on some implementations.  On 
some systems, fsync() is a no-op.  This certainly
makes it run a lot faster, but the downside is that
the data does not necessarly reach the disk surface
when SQLite thinks it does, and so if you lose power,
your data might get corrupted.

I have not heard of problems with fsync() on RHE3.
But perhaps fsync() is disabled on that OS.  Or 
perhaps fsync() is disabled by the particular disk 
controller you are using.  Who knows.

This is certain:  By the laws of physics you cannot
do more than about 60 transactions per second on a
7200 RPM disk drive.  If you are seeing more than
that, then something is wrong with your system and
you will likely corrupt your databases if you lose
power.

--
D. Richard Hipp <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to