One,
PostgreSQL is extremely stable. Indeed, MySQL has a variety of engines, and the anti-strike ability of engines such as Innodb has indeed made great progress in disaster scenarios such as collapse and power failure. However, many MySQL users have encountered the scene that the server-level database is lost-the MySQL system library is MyISAM's PG database 15 minutes, and the former DBA flashed by without any pressure.
Second, any system has its performance limit, which is limited in high concurrent reading and writing, load? Near the limit, the performance index of PG can still keep hyperbola or even logarithmic curve, while
MySQL obviously reached a peak and then declined. These curves frequently appear in the test data of third parties, and interested friends can Google them or build a test by themselves.
Third, in Europe and America.
PG is far from being so mainstream in China, and many excellent teams are using it. Almost all mainstream development languages have mature development interfaces of PG, so don't worry. Like Python's dbapi, it also supports asynchronous reading and writing of PG, and the famous SQLAlchemy also supports some unique functions of PG.
Fourth, PG
Over the years, it has been in an advantageous position in the field of GIS, because it has a wealth of geometric types, in fact, more than geometric types, PG has a large number of data types such as dictionaries, arrays, bitmaps and so on. Through tools such as SQLAlchemy, the work of developers can be greatly simplified.
Verb (abbreviation of verb) should be watched under the guidance of parents.
The "lock-free" feature of is very prominent. Many MySQL tables need to be locked (perhaps without your notice), and PG can handle them smoothly, even including the operation of cleaning the data space like a vacuum. This is the secret of excellent performance under high concurrency of PG.
Sixth, PG
Functions and conditional indexes can be used, which makes the tuning of PG database very flexible. These functions have been tested by decades of development and application. Not all technologies that you have repeatedly claimed that you don't support are "complex and useless" until the database products that support these technologies can be compared.
Page seven
It has irresistible charm for data analysts and strong SQL programming ability (9.x Turing is complete and supports recursion! ), there are very rich statistical functions and statistical grammar support, such as /zOqiVYc here.
Window syntax. PG can also easily write functions in Python, Perl or even any programming language you like.
Page Eight
There are many kinds of cluster architectures to choose from. Plproxy can support statement-level mirroring or fragmentation, slony can set field-level synchronization, and standby can build a WAL file-level or streaming read-write separation cluster. Synchronization frequency and cluster strategy can be easily adjusted and the operation is very simple. Barcamp was held in Tencent Guangzhou in 2008. I demonstrated it on the spot and it was very successful.
Nine, the general relational database string length is limited, about 8k, infinitely long.
Text types have limited functions and can only be accessed as external big data. The text type of PG can be accessed directly, and the SQL syntax has built-in regular expressions, which can be indexed, full-text searched or used xml xpath. With PG, you can save the document database.
10.PG is the authorization protocol of BSD class. If you really have enough interest and motivation in it, you can enjoy reading the code and modifying the customization. This is an excellent code from Berkeley campus. After decades of tempering, it is a huge treasure.
==================================================================
Finally, I think
PG is not as good as MySQL
First, MySQL has some practical operation and maintenance support, such as
Slow-query.log, this pg can definitely be customized, but it would be better if it can be configured and used.
The second is mysql's innodb engine, which can fully optimize the use of all the memory in the system, while PG does not make full use of the memory under large memory.
The third is that mysql has a memory table, which is an underestimated function.
Fourth, MySQL is now allowed to skip SQL and call API directly on socket. This is a brave attempt. Although the whole community does not use much, it needs to drain the performance team in extreme scenarios. Have to try.