I'm looking at the cost of using MySQL commercially and have decided for the time being that I may be able to use PostgreSQL instead.
However.....I am not sure if it is compa开发者_运维问答tible with everything that I need to use with the system we are setting up.
I have an application that we are running on both android and Iphone and will be sending lots of data and requesting lots at the same time.
So my question to the community on here is does anyone have any experience in using PostgreSQL in conjunction with android/iphone applications that will be making lots of queries?
Also has anyone here used both PostgreSQL and MySQL and decided to go with one over the other and if so why did you make the decision you did.
Personally, I always go with PostgreSQL when I can. MySQL is, in my experience, far too prone to data corruption and lacks many a feature I've come to never do without: array types, full text search with an ACID compliant storage engine, window functions, with statements, etc. Plus, Postgres' tends to find much better query plans than MySQL.
If your app is going to live on the iOS/Android device, that said, use neither. SQLite was designed to live in such embedded systems, it handles simple read/write statements quite well, and (in the case of iOS anyway) it's pre-installed on every device.
I agree with Denis: PostgreSQL is a good choice and is definitely a lot stronger on the SQL feature side than any other open source DBMS (and rivals the "big ones" as well).
MySQL has been easier to setup in a high-availability (master/slave) environment but the game has changed with 9.0 and will change even more with 9.1 and synchronous replication (which is more or less the same as Oracle offers with it's data guard).
Any load balancing of write access across multiple nodes requires not so trivial 3rd party tools, but then PostgreSQL scales quite well on a single server provided you have decent hardware. Most importantly lost of disks in a high-end RAID system (but that is true for all DB server)
We are using PostgreSQL as a backend for several high traffic web-shops and a big portal. All of them having > 1000 concurrent users in average. Peeks are even higher. The shops don't write too much, but the portal is 50% write and 50% read.
MySQL is a good choice as well, but just like Denis I always find myself handcuffed due to several missing SQL features.
精彩评论