Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


PostgreSQL or MySQL?

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Linux, Apache, Mysql and PHP (LAMP) Forum
Author Message
mylesb



Joined: 12 May 2005
Posts: 9
Location: Toronto, Ontario, Canada

Posted: Fri Nov 18, 2005 1:09 pm    Post subject: PostgreSQL or MySQL?  

Hello I know that this isn't that much realted to this forum but I just wanted to ask the question what should I use PostgreSQL or MySQL? I am looking for relaible speed and in a small package. I might condsider SQLite but would have to be given a really good reson.
Back to top  
kiomava



Joined: 13 Dec 2003
Posts: 87

Posted: Fri Nov 18, 2005 1:59 pm    Post subject:  

It's funny how people become impassioned about their database choices, but here's my 2 cents.

I go for postgresql. I am just biased against mysql, though it is very popular and works for many people. I hear rumors of cases where mysql lost transactions under certain situations, though I hear that was fixed long ago. It still makes me not quite trust it, though. Mysql is also not quite as free as postgres. I hear mysql is very easy to install and maintain compared to postgres, but I still find postgres to be very easy to install in the scheme of things. I hear mysql is faster for low numbers of users and low query rates, and postgres is faster for high numbers of simultaneous users, though the benchmarks I've seen are kinda old. Also postgres seems to have always been ahead in terms of the capabilities of its query language, and other various transaction management strategies and database standards, though I forget all the alphabet soup of acronyms that come up.

I've used postgres on a linode 64 and 128 and the speed is fine for my needs. At first I thought there was a problem consuming IO tokens during routine maintenance, but it turned out I had a huge database I'd forgotten about that was causing it. And postgres has made routine maintenance better lately and I haven't seen that problem any more.

Another factor is that already existing open source software is most likely to work with mysql over anything else. Postgres might be #2, and other databases are much less supported.

To be honest, that is the only thing about mysql that appeals to me. It's always a pain to have to reconfigure software that comes with mysql support as the deault and is most tested with mysql. Otherwise, the speed differences are unnoticable, and I am familiar enough with postgresql that I could install it in my sleep. I'll take the rock solid stability and power of postgres over the slightly faster, easier to use mysql any day.
Back to top  
delmoi



Joined: 22 Dec 2005
Posts: 5

Posted: Thu Dec 22, 2005 3:14 pm    Post subject: I prefer postgres  

I'm a fan of postgres. I just don't see any reason to use a weaker system, although mysql is improving quickly, Postgres has always been way ahead of the game.
Back to top  
OverlordQ



Joined: 04 Jun 2004
Posts: 200

Posted: Sun Dec 25, 2005 1:17 am    Post subject:  

Small site, speed a must, use SQLite, then MySQL, otherwise use PostgreSQL
Back to top  
ptomblin



Joined: 04 May 2005
Posts: 24
Location: Rochester NY

Posted: Wed Dec 28, 2005 11:09 pm    Post subject:  

OverlordQ wrote: Small site, speed a must, use SQLite, then MySQL, otherwise use PostgreSQL

Does SQLite do transactions? How about subqueries?
Back to top  
markph



Joined: 16 Jul 2005
Posts: 3
Location: Marietta, GA

Posted: Thu Dec 29, 2005 10:47 pm    Post subject:  

ptomblin wrote: OverlordQ wrote: Small site, speed a must, use SQLite, then MySQL, otherwise use PostgreSQL

Does SQLite do transactions? How about subqueries?

I could easily answer, then explain my answers (I had the same questions when I first heard of it). Why not take a look at what it does not support under SQL92:

http://www.sqlite.org/omitted.html

:D

HTH -- Mark
Back to top  
OverlordQ



Joined: 04 Jun 2004
Posts: 200

Posted: Sat Dec 31, 2005 4:08 am    Post subject:  

ptomblin wrote: OverlordQ wrote: Small site, speed a must, use SQLite, then MySQL, otherwise use PostgreSQL

Does SQLite do transactions? How about subqueries?

MySQL is the least ANSI-SQL compliant Database in the marketplace. MySQL isn't even ACID, so you can't say MySQL 'supports' transactions.

On mysql do this for example:

Code:
create table T (a int, b int);
insert into T values(1, 2);
update T set a=b, b=a;


What is the result? Well, on most REAL database the values whould be swapped: A=2, B=1.
On MySQL unfortunately the result is: A=2, B=2.
Back to top  
kiomava



Joined: 13 Dec 2003
Posts: 87

Posted: Sat Dec 31, 2005 6:58 pm    Post subject:  

Man, with all the LAMP people around, I'm really surprised nobody's come to the defense of mysql.

I'd really suggest testing postgresql with your config. It's really not bad on a low end linode, and will give you plenty of room to grow.
Back to top  
drh



Joined: 29 Mar 2004
Posts: 1

Posted: Sat Jan 07, 2006 10:46 am    Post subject: FWIW: SQLite.org is hosted on linode.com  

OverlordQ wrote: Small site, speed a must, use SQLite, then MySQL, otherwise use PostgreSQL

FWIW, the primary development site for SQLite, http://www.sqlite.org/ is hosted by linode.com. It is a linode160 on host43.
Back to top  
 
       Linode.com Forum Forum Index -> Linux, Apache, Mysql and PHP (LAMP) Forum
Page 1 of 1