mysql的io和sql两个线程作用_为什么 MySQL 使用多线程,而 Oracle 和 PostgreSQL 使用多进程?...

诸如Oracle这种商业数据库,基本都支持多种Process Models, Oracle默认是多进程。

根据Understanding MySQL Internals所说, MySQL一开始是Solaris上的 :Thus in May of 1996 MySQL version 1.0 was released to a limited group, followed by a public release in October 1996 of version 3.11.1. The initial public release provided only a binary distribution for Solaris. A month later, the source and the Linux binary were released.这本书也提及了,为什么MySQL用多线程:Just as a good rider becomes one with the horse, Monty(MySQL author) had become one with the computer. It pained him to see system resources wasted. He felt confident enough to be able to write virtually bug-free code, deal with the concurrency issues presented by threads, and even work with s small stack. What an exciting challenge! Needless to say, he chose threads.Postgres的原因可以在The design of Postgres中找到:

However, this approach requires that a fairly complete special-purpose operating system be built. In contrast, the process-per-user model is simpler to implement but will not perform as well on most conventional operating systems. We decided after much soul searching to implement POSTGRES using a process-per-user model architecture because of our limited programming resources.总而言之,最根本的原因就如方圆说的,主要是当年操作系统对线程支持不给力,而MySQL是特例,因为开发者喜欢挑战(不过事实上,那个时候的线程支持已经基本完善了。MySQL后于Oracle和POSTGRES)

至于如果要了解不同model间的优劣,强烈推荐Anatomy of a Database System第二章Process Models.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值