Maison > base de données > tutoriel mysql > le corps du texte

ServerProcess

WBOY
Libérer: 2016-06-07 16:06:35
original
1388 Les gens l'ont consulté

1.client进行update操作后,其他是怎么协作的? Client进行update操作之后,是由Server Process真正完成的,分下面几步: 1).需要更新的数据在Data buffer cache中直接更新该数据,如果需要更新的数据不在Data buffer cache中则先到Data files中把数据加载

1.client进行update操作后,其他是怎么协作的?

Client进行update操作之后,是由Server Process真正完成的,分下面几步:

1).需要更新的数据在Data buffer cache中直接更新该数据,如果需要更新的数据不在Data buffer cache中则先到Data files中把数据加载到Data buffer cache中再进行更新;

2).进行更新操作时需要对数据进行加锁;

3).把更新日志写入Redo log buffer;

4).再到Data buffer cache中写数据;

2.为什么要先到Redo log buffer中写更新日志再到Data buffer cache中写数据?

数据库的高可靠性与Redo log buffer有关。对数据库的所有操作都会记录日志,这样会放置数据丢失。因为写Redo log buffer特别快,一旦出现在写Data buffer cache断电情况下,数据库重启之后会根据Redo log buffer中的日志恢复到断电前状态继续写Data buffer cache数据。

3.Commit Processing操作介绍。

Commit Processing操作共分以下4部分:

1).Server Process通知Redo log buffer需要进行Commit操作;

2).LGWR把Redo log buffer中的内容刷新到Redo log files中;

3).Server Process通知User Process以完成commit操作;

4).Server Process释放数据锁;

4.auto commit会接收到一条数据进行一次commit操作,效率很低,并且会破坏事务的完整性,可能会出现数据丢失,不建议使用,最好是手工commit。
Étiquettes associées:
source:php.cn
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!