Good riddance mysql!

I used to work really a lot with postgres 8.1 and i loved it. I really love the way postgres approaches databases and its true ACID (atomic consistent integral durable) engine.

Postgres is really clean, it forces foreign keys, data types and allows checks and additional functionality in stored procedures, triggers, views and rules.

Mysql on the other hand tries to make it easier for people to build db based apps. Problem is that it might help rookies to build quickly some shoddy apps but it does not help in bigger projects. It even does a lot of harm.

Database should be reliable, reliable, reliable! it should never let users do things that are wrong, mysql does not always manage to achieve that. Mysql by default uses myisam which is horrible. In addition it uses default non strict mode which for example silently truncates fields that are too long. Try to add a big number into small int, no problem. Mysql wont complain that all your values convert to 32K on insert! Update 20 chars column with a 50 chars into ? no problem! .... well at least untill week later once you realize your backups of source data is lost and you have just half of the oryginal message saved!

I really hate this kind of ignoring possible errors and implicit precision loosing casts. What is even more stupid you can insert '' inot enum column accepting only 'T' and 'F' .... now how stupid is that? Default truncates in non strict mode are a schema killer. There are more wired things like not reassuring not nulls, not allowing checks, default now() by timestamps position in the table etc.

It also gets worse once you start selecting and updating same table a lot. Mysiam is very poor at it and speed drop through the floor because of table locks.

Even that mysql has gone a long way since 4.0 i must say backup and restore is still not perfect. Its much better but still not as good as postgres version of it. also tables get corrupt very easily and it takes forever to rebuild indexes on table with 20 millions rows.

The only feature that mysql has and postgres lacks (at least in the core) is replication. For that alone i would choose mysql with mixture of innodb and myisam tables. But not because i love it .... because postgres cant compete with mysql yet in that area.

To conclude: I love postgres and i have to work with mysql. Hosting companies ignore what is really good. Postgres people, please put pressure on the core team to finally implement core replication module.

Comments

Post new comment

Image CAPTCHA