PostgreSQL vs. mysql comparison

Source: Internet
Author: User
Tags connection pooling rar

Top Benefits of PostgreSQL:

1. PostgreSQL is completely free and BSD, and it's important that if you change PostgreSQL and then sell it, and nobody cares, it means that the PostgreSQL database will not be manipulated by other companies. Oracle database does not have to be said, is a commercial database, not open. While the MySQL database is open source, but now with the sun was bought by Oracle company, is now fundamentally controlled by Oracle, in fact, before sun was bought, the most important InnoDB engine in MySQL was controlled by Oracle company, Many of the important data in MySQL are in the InnoDB engine, which is what our company is all about. So if the size of the MySQL market is inconsistent with the size of the Oracle database, there is no doubt that Oracle will dedicate its lives to MySQL.

2. Many of the open source software in collaboration with PostgreSQL, there are many distributed cluster software, such as Pgpool, Pgcluster, Slony, plploxy, etc., it is easy to do read and write parting, load balancing, data level split and other programs, and this is difficult under MySQL.

3. PostgreSQL source code is very clear, easy to read more than MySQL strong, suspect that the source of MySQL has been mixed. So many companies are basically PostgreSQL do two times to develop.

4. PostgreSQL is more powerful than MySQL in many ways, such as the execution of cluttered SQL, stored processes, triggers, indexes. PostgreSQL together is a multi-process, and MySQL is a thread, although concurrency is not high, MySQL disposal speed, but when the concurrency high, on the single machine now multicore, MySQL's overall disposition function is inferior to PostgreSQL, The reason is that MySQL threads are not able to take full advantage of the CPU.

At present only think of these, in the future think of increasing, look forward to everyone shooting bricks.

PostgreSQL is not the same as the multiple versions of Oracle or INNODB

The biggest difference between PostgreSQL and Oracle or INNODB is that the latest version and the previous version are not separated from storage, PostgreSQL is not divided, and Oracle and InnoDB, and InnoDB is just parting with the data, the index itself is not delimited.

The primary advantage of PostgreSQL is that:

1. PostgreSQL does not have a rollback segment, and Oracle and INNODB have rollback segments, and both Oracle and INNODB have rollback segments. For Oracle and InnoDB, the rollback segment is very important, and the rollback segment is corrupted, causing data loss and even a serious doubt that the database will not start. Because PostgreSQL does not have a rollback segment, the old data is recorded in the original file, so when the database is abnormal crash, recovery will not be like Oracle and InnoDB database as the chaotic recovery, Synchronous demand redo and undo as Oracle and InnoDB recover. So when the PostgreSQL database has abnormal crash, the database is less likely to get up than Oracle and MySQL.

2. Because the old data is recorded directly in the data file rather than in the rollback segment, ora-01555 errors are not reported as often as Oracle.

3. Rollback can be completed very quickly, due to rollback does not delete data, and Oracle and InnoDB, rollback is very messy, in the business rollback is necessary to organize the changes in the business, the records to be deleted, the updated records to be updated back (see Row_undo function), The process of rolling back together will also produce many redo logs again.

4. The Wal logs are shorter than those of Oracle and INNODB, and Oracle requires not only a change in the data file but also a rollback segment.

The main disadvantage of PostgreSQL's multiple editions is:

1, the latest version and the previous version of the history of the storage, resulting in the old version of the need for more scanning, value, but the usual database has a peak, if we arrange vacuum, this is not a big doubt, and in the PostgreSQL9.0 vacuum further strengthened.

2, because there is no version of the index information, the coverage index scan can not be completed, that is, the query only scan index, directly from the index back to the required characteristics, but also needs to visit the table. Oracle and InnoDB are able to;

MySQL Streaming:

Http://www.metabase.cn//mysql5.0.rar

Http://www.jinanwuliangye.com/mysql5.0.rar

Http://www.tongxinglong.com//mysql5.0.rar

Http://www.qclchina.com//mysql5.0.rar

Http://www.vipfuxin.com//mysql5.0.rar

http://www.minnan888.net//mysql5.0.rar

PostgreSQL shunt:

Http://www.lcsyt.com//PostgreSQL.rar

Http://lf.yunnanw.cn/PostgreSQL.rar

Http://www.ceocbs.com//PostgreSQL.rar

Http://www.yzbljp.com//PostgreSQL.rar

Http://www.hyyfscl.com//PostgreSQL.rar

Http://www.shoudashou.com//PostgreSQL.rar

Http://www.shuoma.com.cn//PostgreSQL.rar

Comparison of process form and thread form

PostgreSQL and Oracle are process forms, and MySQL is a thread form.

The process form is high for multi-CPU utilization.

The process form of sharing data needs to share memory, and the thread form data itself is in the process space is shared, not the same thread call only need to manipulate the synchronization between the threads.

The thread form is less capital consuming.

So MySQL can support a lot more connections than Oracle.

In the case of PostgreSQL, if you do not use the connection pooling software, there is this doubt, but PostgreSQL has excellent connection pool software software, such as Pgbouncer and Pgpool, so through the connection pool can support many connections.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.