Re: Effect of MySQL being acquired by Sun Micro



Toby A Inkster wrote:
Erwin Moller wrote:

I never understood how MySQL gained their huge marketshare, given the
fact that PostgreSQL was there, ready-to-use, and free for so many
years. Unless it is MySQL created a Windows version earlier than
PostgreSQL did, so new developers (who only knew how to boot into
Windows) picked MySQL.

The Windows version gave MySQL a big boost, but it's not only that.

Firstly, PHP and MySQL were well-integrated from an early stage. The integration between PostgreSQL in PHP is now just as good, but it wasn't for a while. The growths of MySQL and PHP reinforced each other.

Secondly, PostgreSQL hasn't been around *that* long. It has a history that goes back before MySQL, sure, but before 1997 it wasn't called PostgreSQL -- it was called Postgres. The earlier Postgres system was a relational database system that did *not* support SQL. SQL support was slowly added between 1994 and 1997.

By the time Postgres became PostgreSQL, mSQL already had a strong foothold in the mid-size UNIX database market. mSQL wasn't open source, but it was fairly entrenched. So when an open source alternative (MySQL) came along, offering full API compatibility with mSQL, it is no surprise that it became immediately popular.

Lastly, but not least: performance. No, MySQL is not ACID-complete, and it still has a long way to go to catch up with PostgreSQL, but it's always been fast. As MySQL has started adding features, it has started to slow down a little; and recent releases of PostgreSQL have made massive speed improvements too; so the difference is becoming negligible. But for most simple queries, MySQL is usually still slightly faster.

MySQL achieves a lot of its speed advantages by cutting corners in data integrity checks. (For example, even in current versions of MySQL, configured using default settings, it is possible to record nonsense dates such as the 30th of February.)

For complex queries, PostgreSQL tends to do better. MySQL 5 still isn't bad. MySQL 4 and below just barf and say they don't understand the query. If you've got shed-loads of data and you're into serious optimisation, you can probably make PostgreSQL go faster than MySQL, because it has much better indexing facilities.

For example, say you want to frequently do searches like this:

SELECT telephone
FROM contacts
WHERE LOWER(forename||' '||surname) LIKE 'john do%';

(And don't get me started on MySQL's incorrect handling of the '||' operator, and its general butchering of standard SQL syntax!) then on PostgreSQL, you can create an index on an arbitrary expression:

CREATE INDEX fullnames
ON contacts (LOWER(forename||' '||surname));

MySQL cannot create indexes on expressions -- only on columns.


Hi Toby,

Thanks for the historical perspective on mySQL's popularity.
I didn't know SQL support was added that late (from 1994 onto 1997).
I think I started using PostgreSQL around 1997, so that was a good year in retrospect. ;-)

But the rest of your response only underlines why PostgreSQL is better in so many respects than MySQL. ;-)
Anyway, I'll simply stick to PostgreSQL unless I am forced otherwise, in which case I always use an abstractionlayer (ADODB) to ease the pain.

Regards and thanks for your response,
Erwin Moller
.



Relevant Pages

  • Re: PHP MySQL WHY?
    ... > Why is it MySQL and not PostGRES or SQLite? ... Because more hosting providers have MySQL than either PostgreSQL ... Windows server, while PostgreSQL server only runs on Windows with ... Because PostgreSQL is more cumbersome to upgrade. ...
    (comp.lang.php)
  • Re: Python, xml, databases, ...
    ... I've definitely seen MySQL used where both server and client run locally, ... >> On Windows, both MySQL and PostgreSQL rely on the Cygwin dll. ...
    (comp.lang.python)
  • Re: Python, xml, databases, ...
    ... I think you want to be clear whether you want a database or not. ... Any machine can run a service (such as MySQL or PostgreSQL), ... both MySQL and PostgreSQL rely on the Cygwin dll. ...
    (comp.lang.python)
  • Re: Looking for a database
    ... >> The obvious choices on fedora will be MySQL and postgresql ... > If I was to chose between Postgresql and another free database it would ... > be between Postgresql and Firebird, ...
    (Fedora)
  • Re: Effect of MySQL being acquired by Sun Micro
    ... PostgreSQL did, so new developers (who only knew how to boot into ... Windows) picked MySQL. ... By the time Postgres became PostgreSQL, mSQL already had a strong foothold ...
    (comp.lang.php)