List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:February 27 2000 7:22pm
Subject:How mysql does updates/inserts ?
View as plain text  
Hi!

>>>>> "Peter" == Peter Zaitsev <pz@stripped> writes:

Peter> I'm wondering how mysql does it's inserts/updates - more certan - what it
Peter> does after it writes this information into data file ? Does it uses fsync()
Peter> or fflush() òî sync data to the disk or it just flushes it into
> operation
Peter> system cache (so if MYSQLD crashes data will be writen anyway). I'm just
Peter> asking this because of thinking how to tune my operation system cache
Peter> delayed write to make it work faster - I have a table which has many
Peter> frequent updates which does not touch keys.

During execution of one SQL statement, MySQL may cache rows + keys,
but before returning an ok / error to the client, it will write all
changed data to disk with write();  It will not normally fflush() the
data (you have to start mysqld with --flush for this).  In other
words, everything should be in the system cache so things should be
updated ok even if mysqld crashes (as long as the system doesn't
die totally).

Peter> Could anyone explain this (there is nothing about this in the manual).

Regards,
Monty
Thread
How mysql does updates/inserts ?Peter Zaitsev26 Feb
  • How mysql does updates/inserts ?Michael Widenius27 Feb