Mon, Sep 06, 2004 at 11:56:21PM -0700: Darren Duncan wrote:
> At 9:20 AM +0300 9/7/04, George Ionescu wrote:
> >as Nuno Lucas suggested, I've tried inserting one record using 
> >synchronous = OFF. That makes a *huge* difference: 150 ms 
> >(synchronous=FULL) vs. 3 ms (synchronous=OFF) !! So I'm asking this: 
> >anyone has had any real-word experience with multi-user access and 
> >setting synchronous = OFF on Windows NT systems ? I've read the docs 
> >and I know the risks, but I was wondering if any of you could share 
> >your real-word experience... If the database becomes corrupted after 
> >a power failure while inserting records, is there any way of 
> >repairing the database?
> 
> What you probably saw with the 3ms is the time between when you 
> issued the insert command and when control was returned to your app, 
> but the new record was simply in RAM and not on disk.  The operating 
> system would have written it to the disk some time later.  So in 
> other words, the time is so much faster because the slower action 
> actually did something but the faster action did nothing during the 
> time.  The main risk is that your app is thinking the data is saved 
> at a certain point in time, but it actually isn't. -- Darren Duncan

Using synchronous=OFF is a design choice, not a risk.
For non-mission critical databases, you can easily have a "good"
data reliability after a crash using a journaling FS and incremental
backups.
If you want the speed and the fs sync, you probably need the hardware
(less and less expensive).

--
Guillaume FOUGNIES

Reply via email to