PostgreSQL 9.0 Released
poet writes "Today the PostgreSQL Global Development Group released PostgreSQL 9.0. This release marks a major milestone in the PostgreSQL ecosystem, with added features such as streaming replication (including DDL), Hot Standby and other nifty items like DO. The release notes list all the new features, and the guide explains them in greater detail. You can download a copy now."
Congratulations to all the Postgres developers and a big thank you from me for an amazing job! Postgres is a wonderful RDBMS and one of the best free software projects there is. Rock on!
Football Odds
I read the notes, noticed the Column and WHEN triggers. Is this in other SQL databases? If it is, I haven't seen it before. In any case, it's pretty cool that you can setup triggers on a conditional statement. That would really help me out in a lot of scenarios, as I work in the BI space, so alerting is a big deal.
The documentation (just links to web pages) has gotten out-dated and inconsistent, and hard to use over the years. Does the new release come with a clean up so that it is actually easy to use and understand?
Starships were meant to fly, Hands up and touch the sky - Nicky Minaj
LMAO... unless my sarcasm detector is malfunctioning, comparing Postgres to MySQL is extraordinarily absurd... like comparing megaliths to legos.
The Admin and the Engineer
Yes first, congratulations to those folks. I am still waiting for a front-end to PostgreSQL that is as functional and easy to program as Microsoft's Access.
I might be flamed here but there is nothing that bests Access in the open source world. Being able to program business logic into a form is something that Access and VB are pretty good at.
What open source program can replace these two Microsoft beasts?
I think you've got your databases backward when it comes to integrity and verification...
The ringing of the division bell has begun... -PF
Yes, but MySQL has a shoddy parser (needs a space after the -- comment tag), poor trigger failing (you have to do a kludge and dump a varchar into an int to get it to fail), apparent lack of direction (how many forks and engines?!), no CTE support and the list goes on. I am constantly banging my head against a wall with MySQL. I use MSSQL for work, Postgres at home and MySQL on hosting.
I am truly surprised that most web hosting companies do not offer Postgres. Postgres also allows writing of DB functions in C, Java, PHP etc. like Oracle, which is useful for bundling code into the DB (making the DB the application) without everyone having to see your SQL source for functions. It is also licensed on BSD which is good for using their libpq library in commercial apps; MySQL's C API is GPLd or licensed expensively from Oracle, although there are moves toward making it free for use in commercial apps (as far as I can tell from the mishmash of info coming from their sales rep via email).
Also, as far as I know, MySQL puts all of its indexes in memory for replication which is a problem if the node goes down. Can anyone enlighten me?
In any case, well done to the Postgres team. Not only is their software package neat, their documentation is some of the best I have ever seen.
Heh, what are you talking about? Postgres didn't even support foreign keys until version 5 and then even then it wasn't acid compliant. Mysql had all these things (pretty much on par with oracle) years before postgres.
The new features are much admired by all (and deservedly so), but a heavier footprint typically means poorer performance overall even if there's accelerated performance in specific areas or improved programming. I'd like to see a performance plot, showing version versus performance versus different types of system load, in order to see how well new stuff is being added in. It might be merged in great and the underlying architecture may be superb, but I would like to see actual data on this.
Also, PostgreSQL and MySQL aren't the only Open Source SQL databases. Including variants and forks, you really need to also consider Ingres, Drizzle, MariaDB, SAP MaxDB, FireBird and SQLite. If you want to also compare against Closed Source DBs, then you'd obviously want to look at DB/2, Oracle, Cache and Sybase. I'd love to see a full comparison between all of these, feature-for-feature, with no bias for or against any specific development model or database model, but rather an honest appraisal of how each database performs at specific tasks.
I like PostgreSQL a lot. I rate it extremely highly. However, without an objective analysis, all I have is my subjective perception. And subjective perceptions are not something I could credibly use in a workplace to encourage a switch. For that matter, subjective perceptions are not something I would consider acceptable for even telling a friend what to use. Perceptions are simply not credible and have no value in the real world.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
Please tell me you're kidding. Anyone suggesting MySql for real work should just be laughed at.
Perhaps, but PostgreSQL had the single most important extension AUTO_INCREMENT as a column type which easily trumped all of MySQL's advantages. While MySQL just had this clunky 'sequences' concept.
An engine like PostgreSQL is so complex, there are few standard tests that could really give you the data you're looking for, unless your application is so vanilla the KKK would endorse it. The only way to understand -- beforehand -- how a new version of a DB like this would work in an existing environment is to set up a test server, set up your database on it, and test it against the real-world operations the production server is experiencing, then compare the two in areas like execution time, memory utilization, thread count, etc. After you'd carefully evaluated what benefits any new features might bring you.
Seems to me that if you want to get beyond "perception" and into a worthy objective analysis, complaining is a waste of your time, because only you can do such a thing. If you want general info, the PostgreSQL team already gave you that -- they claim performance hasn't been hit. And a canned analysis doesn't, in my experience, reflect your own results. Benchmarks may give great results, but you write a simple little join a little funny, and oh brother, can your results differ. And so forth.
*** I've been using PostgreSQL for years; I'm not affiliated with those people, but I am pitifully grateful to them.
I've fallen off your lawn, and I can't get up.
PostgreSQL *must* be the leading open source SQL database, now. People are bashing us on Slashdot. That's always a sign of success.
Thanks, guys!
--Josh Berkus
PostgreSQL contributor
Nested queries can cause a lot of headaches as well. (needs some redundant 'select*' inbetween)
Firebird is substantially less capable than Postgres *or* MySQL, and is full of ridiculous arbitrary limits (i.e. per-table cap on *combined* column lengths in the 2KiB range? Really?)
If "anyone suggesting MySql for real work should just be laughed at", then anyone suggesting Firebird for real work should be deported (from Earth).
Captcha: sucked
Given the numbers, you better start laughing at much of the world. (note: not that I'm taking sides - I'm too stupid enough to figure out how to install postgreSQL the right way - though I'd prefer it over MySQL from what little I know)
I read TFA and all I got was this lousy cookie
LOL! That's either one of the funniest or most ignorant things stated on /. in a while.
MySQL has a long, long reputation for poor ACID conformance. PostgreSQL, on the other hand, has a long and well respected reputation for both ACID conformance and a variety of lock/update methods which allow for varying degrees of integrity.
If you're running Windows, there is a one-click installer available.
If you're on Linux, fetch a build from your repos (although it will be old). Set up the DB directory, and modify the conf file for access, and you're good to go. Check out pgAdmin if you like GUIs.
In any case, the only bit you need to read to get started is here: http://www.postgresql.org/docs/9.0/static/runtime.html
If you're used to MySQL and the "show databases" command etc., these don't exist on Postgres. Commands available via the command line tool psql are the best way to do it.
Also, if you're used to MS SQL or MySQL dumping all of their DBs in one or two files, this is different on Postgres. It spreads the data into lots of little files. Just thought I'd warn you! But it is easy to get going, thanks to the superb documentation.
From the packages ought to be easy enough for anyone. Rpms or debs available to anyone who knows how to use a web browser.
Um, yeah. MySQL, out of the box, using the defaults, doesn't support foreign keys now. You have to specifically create the tables with a non-standard SQL code to get them to use the right database backend to get foreign key support.
Unless you mean by 'support' 'Will silently accept and throw away'...
Foreign keys have been enabled and working by default in Postgres since version 7. (There was no version 5...) That was released just over ten years ago at this point.
'Sensible' is a curse word.
| Please tell me you're kidding. Anyone suggesting MySql for real work should just be laughed at.
I'm not sure how you got modded to +5 with this statement, but your statement is uninformed and completely false. While MySQL isn't in the class of Oracle for HA, MySQL with InnoDB is damn well is a competent database and I don't just mean for LAMP.
would it be possible to store my information in this database? i am a medical doctor, see patients daily and need to record what drugs they are on. thanks. please email me ready solution to download for my medical PC desktop. thanks.
sparc servers, but that went poof about 10 minutes after the Oracle merger.
| Please tell me you're kidding. Anyone suggesting MySql for real work should just be laughed at.
I'm not sure how you got modded to +5 with this statement, but your statement is uninformed and completely false. While MySQL isn't in the class of Oracle for HA, MySQL with InnoDB is damn well is a competent database and I don't just mean for LAMP.
Eh. It's *okay* for lightweight work where you don't care about data integrity or don't add or modify a lot of data. Beyond that it falls apart quickly.
At a previous job we used ActiveRecord hooked up to MySQL to handle an influx of temporal data that was meant to be quickly processed and usable for reading back in real time. ActiveRecord uses sequences (so, auto increment fields in MySQL -- since proper sequences are lacking in MySQL) for the primary key. With Postgres this is not a problem at all. InnoDB, OTOH, locks *the entire table* to update an auto increment field. The sysadmin/dba was averse to using Postres, so the result was a series of complex and tedious to debug performance problems and queues. We spent countless hours dancing around the performance problems inherent to table level locking.
Of course we could have gone with MyISAM... but data integrity was important. There were other seemingly basic features that were lacking in MySQL (timezone support and a useful explain command come to mind). As far as I can tell there aren't a lot of good reasons to actively choose MySQL. The lightweight cases are well handled by SQLite, and the heavier stuff will almost certainly benefit from what Postgres has to bring to the table.
The revolution will be mocked
MySQL can be used for many things. Dismissing it as something that cannot be used for "Real Work" is ridiculous and a stupid statement. That is not too say there are things it should not be used for. But dismissing it out of hand is rather stupid. I think it does very well providing me with Wikipedia articles.
not really. the management tools alone are bad enough to disqualify it from my arsenal.
"Real Work"? What's that? MySQL was for a very long time the DB used by adsense and youtube...
How many projects use MySQL and how many use PostgreSQL?
PostgreSQL might be a good db, but that doesn't make MySQL a piece of shit...
MABASPLOOM!
it wasnt me
Blah... I started to think that slashdot is full of angry fools, who think that ANY other software besides the software they use is bad and evil. PostgresSQL ? anyone? Where is it when the REAL life is dominated by SQL Server, ORACLE and maybe DB2?
Hate all this Hypocrisy.
Yes its a good database, but please stop being such ass-holes and dissing any other SQL implementation that doesn't fit your mold. Like anyone's going to change their technology base based on a few fan-boy comments, nobody cares and nobodies listening!
If you didn't start off every thread by slagging MySQL, firebird etc then somebody might actually bother to read your comments.
-1000, out in left field. Cuckoo. Woo-oo-oo. Twilight zone. Needs brain scan.
It's called Serial instead of auto_commit but the semantic is the same and used with
MyPrimaryKey serial not null primary key, ...
It's not 2000 anymore. 99% of the problems people have historically with MySQL are simply not present in recent production versions. PostgreSQL and MySQL roughly have feature parity nowadays, Stop treating MySQL as if it's some toy. WikiVS has a good, up-to-date comparison: http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL
I also find it amusing that an AC below complains about "how many storage engines"? Whoosh, that's the sound of the point flying over his head.
By the way, I'm not dissing PostgreSQL in any way, I think it's great. But it's about time some meaningless mantras stop being chanted.
auto_commit? What's that? No such thing in ISAM, the model is [was] called atomic operations.. also known as LOCK TABLES :)
You have to specifically create the tables with a non-standard SQL code to get them to use the right database backend to get foreign key support.
The what to the who, now? Dude, if you're using MySQL and you have issues because you can't get past the default storage engine, I can't wait to see what happens when you have to do actual work.
2000 has called, they want their knee-jerk mantras back: http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL
Dude, this is Slashdot. For many of the "old timers" here (and a good portion of the new-timers), PHP is still a toy language, MySQL doesn't even have transactions, and Windows 95 is horrible. For the rest of the world, times have changed.
"Real Work"? What's that? MySQL was for a very long time the DB used by adsense and youtube...
Uh-huh. That's because if Youtube loses a video of a cat with 3 views, who gives a flying fuck? Ask your bank or your credit card company what database they use to store their financial transactions. Probably won't be PostgreSQL, but it sure as hell won't be MySQL. And they're only using Oracle because $10M to them is chump change.
http://cltracker.net -- powerful craigslist multi-city search
The AdWords system was initially implemented on top of the MySQL database engine. After the system had been launched, management decided to use a commercial database (Oracle) instead. The system became much slower, so eventually it was returned to MySQL [3]. The interface has also been revamped to offer better work flow with additional new features, such as Spreadsheet Editing, Search Query Reports, and better conversion metrics.
http://en.wikipedia.org/wiki/AdWords
Just sayin'.
No, I'm fairly sure you have that backwards.
PostgreSQL 6 was the first version. PostgreSQL 7 (which added foreign key support, apparently) seems to have been released around 1999 / 2000. It's been enabled by default ever since. Same goes for ACID - the PostgreSQL 7 line had proper transactions support, and I believe it may have had that from the first version (~1996).
InnoDB didn't show up in MySQL until late 2001. The default table type in MySQL is still MyISAM, which doesn't support foreign key constraints, and isn't ACID. InnoDB is... barely. It still acts as a dumb data store though - you can't really enforce any useful constraints on the data.
Part of the reason MySQL gets treated as a toy is its release discipline- or lack thereof. At least one of the 5.x releases came out with *known* data-loss bugs; that's just not even remotely acceptable in a database, and that's the sort of impression that's hard to shake: people aren't just going to look at subsequent releases and go "oh, well, they say they're paying more attention this time, I guess that's good enough".
The ringing of the division bell has begun... -PF
Nice, so basically, only banks and financial institutions do 'real work' then? Strange world you live in...
I work for a $100M company that generates all its income from a website I maintain, and it's running on PHP and MySQL..
MySQL might not be a flawless DB, but it gets the job done just fine.
MABASPLOOM!
That's odd that you say that because if you look at all the MySQL forums you see it's being used for all sorts of things, and the company was worth a lot of $$ to both Sun and Oracle. They must be complete fools.
How often do you spend time dealing with a mysql blowup that's not HW related? Also what kind of data are we talking about here? (size, xacts/sec, other pertinent info. tho, no need for a full profile of your rig or anything) I don't use MySQL myself, but that's because the screams of my friends keep me from venturing into those woods.
He is saying that the data integrity of Oracle and DB2 type RDBMS engines is far superior to MySQL. I think you will find many IT people who believe this in billion dollar companies who are concerned about maintaining database integrity. And so is the integrity of Postgres's engine. I think where Postgres falls down is with 'high availability'. It now has its new hot standby feature, but this new feature still doesn't support reasonable failover functionality. And in fact, after watching an EnterpriseDB webinar about the new hot standby feature, my impression is that it is still rather kludgy. I think a few more iterations and improvements are necessary, and they might have to change the way the transaction logs are captured/stored in order to make it really useful. I could be wrong, it happens, but it doesn't pass my own sniff test with respect to 'ready for prime time'.
-- I ignore anonymous replies to my comments and postings.
Stop treating MySQL as if it's some toy
It's not a question of features. It's a question of scale. 300,000 queries per second? That would be a major milestone for MySQL. How about a billion? 50 billion? Will it ever get there? MySQL is probably the right application for your 30,000 member forum site, probably be better than Postgres in that instance (maybe). But for the big stuff, the really big stuff, where you need more than a screwdriver and a hand truck, you need literally need a forklift and a crane, you don't even bother trying to use a screwdriver and a hand truck. Either you get a crane, or it doesn't move.
The Admin and the Engineer
We used to be on on PostgreSQL. We switched to MySQL about 2 years ago, and never looked back. PostgreSQL had a few features that were nice, but MySQL was SO much faster and easier to deal with. And best of all, it's in the mainstream, so there are oodles of resources out there for it. And yes, we use full transaction processing.
I suspect your knowledge of what MySQL can and can't do is out of date.
Sometimes it's best to just let stupid people be stupid.
"How many projects use MySQL and how many use PostgreSQL?"
This argument actually doesn't say much of the quality of either. Using the same reasoning one could say that shit must taste really good since hundreds of billions of flies like it.
Other factors affect how much something is used, not quality alone. Quality might not even be an important factor! Unfortunately.
I am not saying that MySQL is a piece of shit, just that this kind of argument isn't always valid.
Congratulations and a big thank you to all PostgreSQL developers!
I'm especially excited about the new replication features. The new trigger functionality looks exciting, too; I will have to look into that.
Keep up the great work!
Please correct me if I got my facts wrong.
Is there any recommended table designer or query tools for postgress? I'm not expecting Toad but something functional like MySQL Administrator and Query browser.
I could see your point if MySQL weren't being used in some high-profile instances. However, even that isn't the case anymore. For instance, Google has submitted quite some patches of its own to MySQL.
See MySQL's case studies here: http://www.mysql.com/why-mysql/case-studies/
Disclaimer: I am not in any way related to MySQL as more than a web developer. I'm even contemplating a move to PostgreSQL somewhere down the road due to the recent Oracle shenanigans. But nowadays, it is a pretty good product.
Its extremely ironic that you changed just as PostgreSQL become considerably faster than MySQL. PostgreSQL has always been far more scalable. To now hear you brag that you've never looked back at a superior and faster database because of your steadfast and likely false belief that MySQL is faster, is rather amusing.
One of the biggest problems with the MySQL user base is that they don't have any idea what "faster" means nor do they typically understand how to benchmark. Made worse, they constantly confuse speed with scalability. And made ever worse, most MySQL users take the MySQL benchmarks to heart when time and time again they are nothing but marketing lies. Most independent tests have historically had lots of problems even getting MySQL to stay running until the end. And when it actually does finish, its normally somewhere between the middle of the pack to dead last - and that's with all the other databases forced to use the lowest common feature which prevents them from using their advanced, much, much faster features.
The bottom line is, MySQL is popular because it has buzzword compliance for people who almost always don't know any better; but most of all, was readily available on Windows at a time when everyone was looking for a free database to go to. PostgreSQL is popular because it has both buzzword compliance, is far more feature rich, almost always out performs MySQL, and underscores, not to mention truly understands, what ACID is all about - while providing a very rich set of features which MySQL is unlikely to ever match. And that's ignoring that MySQL's optimizer absolutely stinks for anything but the most simple of queries.
The best rule of thumb is, think of MySQL as a really fast Access database. If you wouldn't use Access, ignoring database performance in the comparison, you should think really hard about using MySQL. There are so many superior and still free RDBMs compared to MySQL, its easy to see why so many get so frustrated when others insist on injecting an dramatically inferior solution into the equation, just because it has buzzwords.
You bring up a good point there, and I won't try to dismiss it as it's certainly valid. Misfired releases, so to speak, have hurt MySQL in recent history and created division even in its own community.
I'm just trying to shake down these age-old misconceptions that no longer have any base in reality :) (no foreign keys! no transaactions! no ACID!).
Here are is a small performance comparison which was taken during a staged hardware and OS upgrade. Unfortunately there are two factors which changed (OS and DB), so its not entirely possible to attribute all the performance gain on the same hardware to just PG 8.0 -> 8.2. Despite that, it was impressive to see OS and DB releases running ~30% faster on the exact same hardware.
* FreeBSD 7.3 on Xeon 5520, pg8.2 : 483ms
* FreeBSD 7.3 on P4 3.2GHz, pg8.2 : 646ms (same hardware as below)
* FreeBSD 6.0 on P4 3.2GHz, pg8.0 : 998ms
The fact that mysql still lets me insert "0000-00-00 00:00:00" into a datetime field is just crazy. But even more horrible and wrong is if you enter a wrong date into a datetime field and it accepts it and sets it to 0000-00-00 00:00:00. This is just plain wrong and horrible. How can a database do no integrity check. It feels like using varchar for everything.
"Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
You can't seriously comment on a database engines performance and in the same breath mention that you use ActiveRecord. No database is fast enough to compensate for a really crappy ORM. If you are using ActiveRecord and MySQL/innodb I guess that switching to postgres might give you a slight improvement but learning SQL and ditching the ActiveRecord crap can give you several magnitudes.
InnoDB, OTOH, locks *the entire table* to update an auto increment field.
This is fixed in MySQL 5.1, just use innodb_autoinc_lock_mode=2
As far as I can tell there aren't a lot of good reasons to actively choose MySQL.
Tell that to facebook and google, cause they think otherwise.
I totally agree that MySQL lacks lots of features. But it's a pretty solid db that is successfully used by lots of people in production environments.
Thought there is a dump all for postgresql too.
"Freiheit ist immer auch die Freiheit des Andersdenkenden" - Rosa Luxemburg, 1871 - 1919
Lots of projects use MySQL by default, though that's probably more for historical reasons these days. (Postgres used to be way behind in the performance stakes, which means if you're offering hosting and you wanted to offer similar performance to MySQL for your customers you had to purchase a hell of a lot more hardware).
The thing is, it's not uncommon with MySQL to find that in order to get everything working just so, you have to fight the damn thing. Foreign keys weren't properly supported for years, and even today you have to explicitly use non-standard SQL syntax or the engine silently throws them away.
Once you've used Postgres for any length of time, it's clear that the entire application is designed with one thing foremost: Data integrity. You really have to work to store your data in such a fashion as to lose ACID compliance - I honestly can't remember the last time I saw a Postgres system seriously messed up, and you don't generally get sections of the Postgres manual for the stable version prefaced with warnings like "Look out, while you can do this we haven't really tested it and there may still be bugs that result in serious data loss".
It takes a great deal of determination and will-power on top of blind ignorance to mess up Postgres, whereas with MySQL (even today) it's really rather easy to mess up simply because you didn't turn over the page in the Junior Colour Encyclopaedia of Databases and read the paragraph that says "Here be dragons!".
MySQL fans will say "What are you doing setting up a live database without having at least some familiarity with the manual?". Postgres fans will say "What is the database doing making it so easy to balls it up so royally?".
no foreign keys! no transaactions! no ACID!
One of the things that put me off mySQL some years ago was people both within the wider community and within the project team themselves seeming to claim that if you wanted such things you were doing things wrong. Not "we don't support that (yet)" but "you're being stupid" and if pressed the best you could raise them to was "here's a workaround that will achieve more-or-less the same thing with a chunk of extra work".
I may be about to be told I'm being wrong headed (and perhaps petty) here as no doubt the entire development team has changed several times over the years, but I can't quite shake the thought that maybe those features were implemented just to shut people up rather than because the team actually understood their importance to those asking for them. If I need/want those properties, other things being equal, I'd rather use a database that has had those properties baked in for much longer.
Feature parity my ass.
The what to the who, now? Dude, if you're using MySQL and you have issues because you can't get past the default storage engine, I can't wait to see what happens when you have to do actual work.
You can't imagine my bemusement with MySQL when I discovered that the tables I had explicitly instructed it to create as InnoDB had silently been converted to MyISAM because InnoDB wasn't enabled on that MySQL server. One of those little quirks of MySQL that make it so charming. :)
Anyway, GP is indulging in a bit of Anus Loquacious. He's saying that "Postgres didn't even support foreign keys until version 5" as if that's a comparison to MySQL version 5. PostgreSQL didn't even have a version 5. It began as a re-write of a previous academic system and begins at version 6.0 and that was released in 1996, fourteen years ago! I'm not sure exactly when foreign keys became supported, but they were in by 7.0 which was released what, in 2000? In any case, that was over ten years ago. So even if you want to compare which database got to a particular function first (which is pretty pointless), Postgres has had it for ten years. MySQL is technically not far behind as InnoDB was first distributed with MySQL about a year later in 2001. But it was far, far from mature back then. Anyway, to summarise, the GP is (a) wrong about (b) an irrelevant argument.
Aide-toi, le Ciel t'aidera - Jeanne D'Arc.
You know, like in MySQL?
Thankz bye
Please tell me you're kidding. Anyone suggesting MySql for real work should just be laughed at.
I haven't seen a car analogy yet, so I'm going to be the bastard and first use one. MySQL is like a small engine car. Postgres is a bigger 4x4. If you're driving through town in a 30mph zone, they're equivalent. Once you start going up a steep hill, you see the difference. It's pretty obvious which DB is which car in this analogy. The hill represents either a need for advanced functionality, serious robustness or, in some scenarios more complex than just simple queries, scalability. The thing of it is, that there are a lot of scenarios out there that are just "driving around town in a 30mph zone". I fully agree that Postgres is superior in a number of ways. MySQL is marginally simpler to develop for at an low-professional level. But MySQL is adequate to a lot of people's needs. It doesn't put Postgres down to acknowledge that.
What really confuses me in the GP's post is introducing Firebird to the equation. That's definitely a comment that requires supporting.
Aide-toi, le Ciel t'aidera - Jeanne D'Arc.
It is not possible that a video of a cat has only 3 views. Learn the laws of the internet.
Does it have materialized views yet ? Oh, and can I configure it so that it doesn't have those two ridiculously huge undo-type files so I can use it on smaller hardware (hey - it's fully replicatable now, right ? That includes scenario's where you replicate from a big master to several small slaves) I know, I know. Keep pushing the bar. Congratulations guys, from a happy user.
Religion is what happens when nature strikes and groupthink goes wrong.
See Slashdot? This is what you get for putting Twitter buttons on the front page. Can we admit that it was a mistake now please?
I am TheRaven on Soylent News
Not sure about FaceBook, but Google's uses of MySQL are quite limited. They use their own BigTable for all of the serious stuff.
I am TheRaven on Soylent News
Oh look, here's someone who'd like to tell us about his very own definition of "real work".
Lets hear it.
PostgreSQL might be a good db, but that doesn't make MySQL a piece of shit...
Correct. MySQL was a piece of shit completely independently of PostgreSQL.
I will second that. I remember a discussion with a mysql dev where I was trying to raise the point that the db should not accept 30 feb as a valid date. A quite senior dev, backed up by numerous voices on the mailing list, was trying to convince me that it wasn't the db's job to check for that, quoting performance concerns. This was at least 10 years ago. But nonetheless, it's not a good start for a DB to have core developers like that. I don't like MySQL primarily because it cares about standard SQL just about as much as Microsoft does. I find the documentation to be abhorring. DDL is cumbersome. Working in commandline mysql is pure torture compared to psql (on linux! psql for windows is rubbish; not surprising considering the mess that windows commandline terminal is).
There is no feature parity. MySQL does have decent range of features these days, but they are often tied to some specific storage engine, which means a lot of them are mutually exclusive.
Want full-text search and GIS? Sure, but you lose ACID and are stuck with table level locking..
"Real Work"? What's that? MySQL was for a very long time the DB used by adsense and youtube...
How many projects use MySQL and how many use PostgreSQL?
PostgreSQL might be a good db, but that doesn't make MySQL a piece of shit...
Nor does PostgreSQL being a good db preclude MySQL from being a piece of shit...
Also, as far as I know, MySQL puts all of its indexes in memory for replication which is a problem if the node goes down. Can anyone enlighten me?
I am using MySQL replication for so many years that I don't remember the exact time. The size of the indexes in our database is larger then the memory allocated to MySQL, so there is evidence that this is not true. It is an absurd assumption anyway, if you know MySQL. On the other hand there is another MySQL product, about which I don't know much. You are probably talking about that. That is an in memory clustered database. I believe usually they use regular MySQL instances to have a permanent copy of the data of the cluster.
My company has been working with Postgres for 5 years. We've built several large sites with it for others and run a webapp for hospital professionals backed by Postgres (with a fair amount of use of stored procedures). Not only have we found that Postgres has been incredibly stable over the years, but we have also found that upgradeability an enormous boon. The incredibly smooth upgrade process between major versions have allowed us to seamlessly move between versions. Also, the excellent release notes allow us to easily pick up any changes that are likely to affect our systems. Postgresql is both a wonderful product and an excellent community.
MySQL is still behind postgres in terms of features and SQL compatibility. For example you cannot use an index to search in descending order and you cannot index using a custom function. Postgres is also much better at server-side languages (more languages and better support).
If MySQL offers all the features then use it by all means. However just because you don't use any in-postgres-but-not-in-mysql features it doesn't mean they are not useful or even essential for many projects.
The Feb 30 issue gets *even better*. For years I used that as a prime example of what's wrong with MySQL, so I was a bit disappointed when I found out they'd fixed it.
Then I discovered that Feb 35th is *STILL* a valid date! The only thing they fixed was Feb 30th and 31st!
MySQL clearly just doesn't get it.
Even better than 0000-00-00 is 2010-02-35.
To now hear you brag that you've never looked back at a superior and faster database because of your steadfast and likely false belief that MySQL is faster, is rather amusing.
You clearly have little experience with MySQL. Look, I understand your smugness and arrogance. I used to feel the same way, based on what I "knew" about MySQL, which is pretty much based on its early reputation.
When I'm talking about speed, I'm talking about real world performance on a REAL application -- our own. It was ridiculously faster. And when we considered switching, I was pleasantly surprised by how much MySQL had grown up into a full-featured database.
In short, these are all excellent products these days that can all do the job. I'm not knocking PostgreSQL. I'm sure it has improved, just like they've all likely improved. But at the time, we had some good reasons for switching. It's fine to prefer PostgreSQL, but your snobbery regarding MySQL is simply out of date.
Sometimes it's best to just let stupid people be stupid.
How often do you spend time dealing with a mysql blowup that's not HW related?
In the couple of years we've been running MySQL (after converting from PostgreSQL), 10s of millions of rows, 21 gigabytes of data, we've never had any hiccups with MySQL of any kind. It Just Works. And I've never heard of anyone else having a non-hardware-related problem.
Sometimes it's best to just let stupid people be stupid.
I only repeat what I've been told. Frankly, I think all databases are painfully slow. I'd like to see LDAP expanded into a fullblown DB implementation, and become to working DB what firefox was once to browsers, a long time ago, or what Chrome was... idk, a couple months ago: the regression of the Swiss Army knife, not with every tool imaginable, but it's super thin and light, and ffffast, but a one trick pony (so to speak).
The Admin and the Engineer
AFAIK, some examples:
Skype and PIR (they handle the .org top level domain ) use PostgreSQL
Yahoo and Youtube use MySQL
New things are always on the horizon
Wikipedia is also an obvious MySQL user.
New things are always on the horizon
@AnonymousCoward #sun were fools and went out of business. #fail
I switched from MySQL to Postgres fanboyism around the time I tried PG and realized I didn't have to choose between (InnoDB) integrity and (MyISAM) fast I/O in FOSS RDBMS. And I could have honest-to-god booleans. I love PG so much. :3
No OS on the planet can protect itself from a user with the admin password. - Yvan256
It's not 2000 anymore. 99% of the problems people have historically with MySQL are simply not present in recent production versions. PostgreSQL and MySQL roughly have feature parity nowadays, Stop treating MySQL as if it's some toy. WikiVS has a good, up-to-date comparison: http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL
Big emphasis on the "roughly". The features may look the same as tick points on a list, but when you actually try to use them, vast differences show up. Roughly bundled-together features without a comprehensive plan is what it looks like to me. For example, no referential transparency or transitive closure. You can't just nest expressions, views, function calls and procedure calls transparently. You can't alias temp tables in procedures, etc... Lots of odd restrictions and "can't get there from here" scenarios.
I also find it amusing that an AC below complains about "how many storage engines"? Whoosh, that's the sound of the point flying over his head.
By the way, I'm not dissing PostgreSQL in any way, I think it's great. But it's about time some meaningless mantras stop being chanted.
Yeah, we shouldn't expect that old bugaboo "conceptual integrity" to intrude on modern software design, right? Can't use full-text indexing and foreign key constraints on the same table? What kind of compulsive freak would want that, anyway...?
You clearly have little experience with MySQL. Look, I understand your smugness and arrogance.
Whoosh!!
This isn't smugness or arrogance. Seriously, think about it. If you heard someone bragging about using x because its faster than y, despite y now being much better than x almost immediately after the selection x, you would enjoy the humor. That's what this boils down to.
As you then went on to boast you've never looked back, additional information was provided so you could realize that you really should be looking back to at least re-evaluate if your braggart position is still viable.
If you don't want to look back, that's fine, but don't get upset when your position puts a smile on other's faces.
I don't know if it changed, but I checked it recently and one still needed a plugin to get foreign keys on MySQL (I wasn't even concerned about transactions, if I were I wouldn't be looking at MySQL). Now, maybe it got fixed, or maybe MySQL is trying to get the same internal organization of Postgresql (making everything a plugin), so I might be wrong, but the database not having it as a core feature simply trowed me out.
Rethinking email
MySQL is quite good at handling big amounts of transactions. What it doesn't seem to be able to do is handling a big number of transactions wile guaranteeing the integrity of the data.
Rethinking email
No, not really.
MySQL has the concept of storage engines, in which, for every table type you create, you pick which storage engine you want to use: MyISAM, InnoDB, etc. That will determine what features one gets. However, most people don't even bother reading a single bit and get a knee-jerk reaction because the default type is the old MyISAM. Granted, it shouldn't be the default anymore, but still... bliss is only one click away for changing the table type.
InnoDB is the second most-common storage engine (the first being the old/kludgy MyISAM) and is ACID-compliant, supports foreign keys, etc. The only thing it lacks is full-text support which is only available on MyISAM tables, but that can be worked around of relatively easily.
There are also other storage engines available, some free, some commercial, and some that enable some neat tricks (like the Blackhole storage engine for replication purposes).
If you heard someone bragging about using x because its faster than y, despite y now being much better than x almost immediately after the selection x, you would enjoy the humor.
IF that's true. I highly doubt you have exhaustive metrics to prove it. And even if it is true, performance was only one reason we switched over. It was the right decision for us.
My broader point was not to knock PostgreSQL, only to make the point that MySQL does not deserve the reputation it has in certain quarters, particularly among PostgreSQL advocates.
Sometimes it's best to just let stupid people be stupid.
Now that MySQL is owned by Oracle it looks like Postgres may, over time, become the only truly FOSS RDBMS.
When I read that there is a major FreeBSD replication bug that MySQL developers have not fixed for some time I have to wonder whether these are the same dirty tricks that Sun employed to advantage some OSs over others. If so this would tend to validate the rumor that Oracle may buy RedHat. Then the gloves would come off no doubt, and Oracle's preferred platforms would get all the bug fixes while other distributions and OSs would get crumbs, like they've done with the Oracle DB for years.
As always, software that is developed cross-platform, on multiple OSs, will be better than software that is developed on a single or smaller number of distributions and OSs. Oracle (and IBM's) efforts to secure vendor lock-in will only work short-term. In the long run their plans won't work out so well but until then I'm sticking with Postgres (and Ubuntu, Debian, FreeBSD, and OpenBSD).
Do you use mysql's built-in replication(master-master)? Out of curiosity, what prompted the switch to MySQL?
You're right, Postgres being a good DBMS doesn't make MySQL a piece of shit. What makes MySQL a piece of shit is the lack of full-text search in InnoDB, the fact that it ignores many DDL clauses it doesn't know instead of complaining about them and tons of other similar things I've forgotten about.
If you are using hand-rolled SQL, most MySQL queries will execute on Postgres without much modification. However, MSSQL will be vastly different.
For example, look at these ugly MSSQL queries with explicit locking, which you will probably have to use as developers and DBAs can't seem to agree on a standard isolation mechanism:
SELECT COUNT(UserID) FROM Users WITH (NOLOCK) WHERE Username LIKE 'foobar'
and
UPDATE Users WITH (ROWLOCK) SET Username = 'fred' WHERE Username = 'foobar'
Also, there is no LIMIT / OFFSET keywords in MSSQL, you have to do crazy shit like:
WITH results AS (
SELECT
rowNo = ROW_NUMBER() OVER( ORDER BY columnName ASC )
, *
FROM tableName
)
SELECT *
FROM results
WHERE rowNo between (@pageNumber-1)*@pageSize+1 and @pageNumber*@pageSize
Source: http://stackoverflow.com/questions/187998/row-offset-in-ms-sql-server
You will soon realize that the Express version is super-limited (4GB max size, 1 GB ram, 1 core, no replication, etc.)
Source: http://www.microsoft.com/sqlserver/2005/en/us/compare-features.aspx
Postgres is highly tunable, but the defaults (that ship with many OSes) are for small footprints. This is an older document, but still relevant with explanations and the annotated config guide (bottom of page). Throw 8 cores and 16GB ram at Postgres, tweak the conf a tiny bit, and the feature set and performance will surprise you.
Tune Postgres: http://www.varlena.com/GeneralBits/Tidbits/perf.html
There's no reason to use MSSQL unless all of your development and applications are on Windows, and your development team can't use anything other than their IDEs in a limited way. Once you start using Postgres, and realize the power behind it, you'll never want to use anything else.
If, for some strange reason, your company wants to spend money and buy DB support, go for a commercial vendor of postgres. Enterprise DB has some nice management features: http://www.enterprisedb.com/products/index.do
Google's AdWords platform supposedly uses MySQL.
The fine folks at CodeOffsets.com will donate to PostgreSQL if you so designate.
Yeah, right.
Yep, pg_dump.
InnoDB, OTOH, locks *the entire table* to update an auto increment field.
This is not the case (anymore) when the number of rows being inserted is known ahead of time, which is the case for most transactions not designed around a "insert into ... select from" statement.
Source: http://dev.mysql.com/doc/refman/5.1/en/innodb-auto-increment-handling.html
http://www.glom.org/wiki/index.php?title=Main_Page
Review from 2006...
http://www.xaprb.com/blog/2006/09/04/a-review-of-the-glom-graphical-database-front-end/
you had me at #!
It was the right decision for us.
It may have been. But since you've never looked back, it may not, and is likely, no longer true. If its good enough, its good enough, but bragging doesn't normally center around the notion of "good enough."
My broader point was not to knock PostgreSQL, only to make the point that MySQL does not deserve the reputation it has in certain quarters, particularly among PostgreSQL advocates.
Hate to tell you, but it has a universally poor reputation amongst the majority of high end RDBMS DBAs. In other words, the same group which typically has high regard for most of its competition, including MS SQL Server, frequently has a very low regard for MySQL. This alone should be reason enough to wonder why that might possibly be.
But since you've never looked back, it may not, and is likely, no longer true.
It may have improved. But who cares? Why would I go back when what I have works well? I generally don't rip out entire database infrastructures unless I have a reason to do it.
This alone should be reason enough to wonder why that might possibly be.
I know the reason(s). It's one of: a) Have never used it, b) Have a vague memory that it doesn't support transactions (which has been wrong for a long time), c) It doesn't support (Feature X) that has nothing to do with reliability.
Google AdWords uses MySQL. If it's good enough for a huge volume, critical task like that, it's good enough for you and anyone else.
The only reason people dislike MySQL is simple ignorance.
Sometimes it's best to just let stupid people be stupid.