MySQL Server Architecture

MySQL 服务器架构:

 

MySQL无处不在

Mysql无处不在,Mysql  is everywhere。

 

支持绝大多数的主流操作系统 , 包括:windows、MAC OS、Linux、solaris等。

支持大量的开发程序语言,包括: php、perl、python、ruby、java、C、C++、C# 等。

 

MySQL’s adoption is in part because of the breadth of it’s support.  MySQL will run on popular operating systems such as Red Hat or Suse Linux, Mac OS, Solaris and Windows.  Once on these platforms, the interface support is even wider with client connections from C, C++, Java, and C#, as well as, scripting languages such as Perl, PHP, Python, and Ruby.  This breadth of OS support and Interfaces makes MySQL ubiquitous in the Corporate environment

 

LAMP Stack

LAMP STACK

 

Mysql数据库的几大优势

为什么开源社区买mysql的帐, MySQL数据库的吸引开源社区的几大特质:

 

 

 

 

客户为什么会考虑购买MySQL 企业版Enterprise Edition :

Oracle收购后的Mysql目标市场

Oracle收购SUN之后,不少人认为Oracle会不惜代价干掉Mysql,以保证其旗舰产品Oracle Database的地位。

但是实际Oracle corp对Mysql有着明确的市场定位, 主要覆盖Web、Web 2.0、Saas、Telecom、OEM/ISV Embedded , 而Oracle数据库的目标市场是ERP、HRMS、SCM和 Data Warehousing , 所以2者并不冲突, Mysql可以成为很好的赢利点, 是太多人杞人忧天了。

但不知道O记 的Sales到底是怎么看mysql这东西的 :)

 

 

What types of applications deployed on MySQL and MySQL Customers

In the Application space, MySQL is very dominant with Web-based applications with them being the most popular.

 

 

 

 

MySQL’s customer base is centered in 5 key areas – Web, SaaS, Enterprise, Telecommunication, and  OEM.   There are more than 400 major customers, such as Google, Yahoo, YouTube, and Facebook. Utilitized in virtually every Web 2.0 companies such as Craiglist, Flickr, Wikipedia, and Zillow.  With strength in Teleco including customers such as Cisco, Comcast, Alcatel and China Mobile.  Strength in Enterprise customers including Associated Press, Shinsei Bank and Toys R’ Us.

 

Mysql存储引擎特性比较

下表列出了Mysql 主要数据引擎架构(如myisam、innodb Storage Engine )的特性比较:

 

Feature MyISAM NDB Archive InnoDB Memory
Storage Limits No Yes No 64TB Yes
Transactions No Yes No Yes No
Locking granularity Table Row Row Row Table
MVCC snapshot read No No No Yes No
Geospatial support Yes No Yes Yes No
Data caches No Yes No Yes NA
Index Caches Yes Yes No Yes NA
Compressed Data Yes No Yes No No
Storage cost (relative to other engines) Small Med Small Med NA
Memory cost (relative to other engines) Low High Low High High
Bulk insert speed High High Highest Med High
Replication Support Yes Yes Yes Yes Yes
Foreign Key support No No No Yes No
Built-in Cluster/High-availability support No Yes No No No

 

 

Dynamically add and remove storage engines.
Change the storage engine on a table with “ALTER TABLE …”

MySQL 如何获得当前会话的TRX_ID 事务ID

 

 

mysql>  show variables like '%commit%';
+--------------------------------+-------+
| Variable_name                  | Value |
+--------------------------------+-------+
| autocommit                     | OFF   |
| innodb_commit_concurrency      | 0     |
| innodb_flush_log_at_trx_commit | 1     |
+--------------------------------+-------+
3 rows in set (0.00 sec)

mysql> select version();
+-------------------------+
| version()               |
+-------------------------+
| 5.5.40-0ubuntu0.14.04.1 |
+-------------------------+
1 row in set (0.00 sec)


mysql>  insert into tv values(1);
Query OK, 1 row affected (0.00 sec)

mysql>  insert into tv values(1);
Query OK, 1 row affected (0.01 sec)

mysql> SELECT TRX_ID FROM INFORMATION_SCHEMA.INNODB_TRX  WHERE TRX_MYSQL_THREAD_ID = CONNECTION_ID();
+--------+
| TRX_ID |
+--------+
| 9648   |
+--------+
1 row in set (0.00 sec)

沪ICP备14014813号-2

沪公网安备 31010802001379号