Ask Slashdot: Is Postgres On Par With Oracle?
grahamsaa writes "I work at medium sized company that offers a number of products that rely fairly heavily on backend databases, some of which are hundreds of gigabytes and deal with hundreds or thousands of queries per second. Currently, we're using a mix of Postgres, Oracle, and MySQL, though we're working hard to move everything to Postgres. The products that are still on MySQL and Oracle were acquisitions, so we didn't get to choose the RDBMS at the time these products were designed. So far, we've been very happy with Postgres, but I know next to nothing about Oracle. It's expensive and has a long history of use in large enterprises, but I'm curious about what it offers that Postgres might not — I'm not saying this because I think that sticking with Oracle would be a good idea (because in our case, it probably isn't), but I'm curious as to how some companies justify the cost — especially considering that EnterpriseDB makes transitioning from Oracle to Postgres feasible (though not painless) in most cases. For those that use Oracle — is it worth the money? What's keeping you from switching?"
Stupid fucking managers
A big code base in PL-SQL I guess that nobody wants to re-write. We have lots of high dollar clients so it's easier to just stay with the status quo.
We have been experimenting with MongoDB with a few of our newer projects. We'll see if that becomes a viable alternative.
MongoDB, run away, run away quickly if you need anything close to ACID or XA.
my previous employer had a similar decision to make when they were restructuring the company. the powers that be decided to pay Oracle big $$ just because of name recognition ... and for the off chance that it would make the company a more appealing acquisition candidate.
imo, if your enterprise is optimized for postgres, you'd be crazy to switch. rearchitecting would be a son-of-a-bitch.
Materialized views (and all the related magic)
Flashback queries and flashback archives (they are really cool)
Index only scans (can be a major performance boost)
No transaction control in stored functions
Oracle handles queries that return 50k plus records far far better.
Oracle uses a statistical optimizer for execution plans in the engine. They are working through the 2nd generation of it to handle situations where they are lots of high frequency values
Temporary table undos
Oracle is really an excellent product for a database in which there will be DBA maintenance. If there aren't DBAs Oracle's complexity becomes a minus not a plus.
Really, it depends. Is the stuff in Oracle using the database as a simple RDBMS? Then likely Postgres would be a good alternative. But there are many great features in Oracle that command the high price. The PL/SQL engine and all that comes with it is extremely powerful. Advanced Queueing is outstanding. The analytic functions are second-to-none. The tools that come with Oracle are great.
That said, I think most projects that need a database could do just fine with Postgres. I'm in the process of converting our corporate system from Oracle to PG now. I've worked with both systems extensively. For really large projects that need special features and absolutely bulletproof DR infrastructure, Oracle is the only way to go.
I choke when I say that, because I simply hate Oracle, the corporation. The database is stellar though...
Most people I've met using Oracle don't know shit about it. It's great if you have lots of data and you want to harvest it with views and stored procedures. But the only people I've met seriously dealing with Oracle were qualified DBAs who only focus on DB dev and the Oracle DB was an internal DB that the web and remote entities DUMPED to.
It have never seen not used as a consumer facing DB for remote parties.
Though I have wrote a few apps that wrote to an internal Oracle DB and provided custom schema with procedures and views so that internal consumers could draft reports. But these were big ticket dudes and it was Marketing that wanted the views. I wrote the procedures for me to help me out as well as triggers etc. They were nice and gave me full admin access and Windows RDC into a Server. For a Global Retailer on the order of magnitude a brand like Levi's that was pretty hot and made my dick grow a couple inches.
But really Oracle and Postgres is Apples and Oranges. I say ditch Oracle, because you likely aren't using it for what it was created for and move to Postgres. The only reason why MySQL is so popular is because 90% of Web Developers don't know dick about what a DB is and how to properly use one. To them it's a data catchall, sock drawer etc. Rails style platforms and shit like Hive have only helped to propagate the fucktardery around DBs in Web Development.
When you can write 40% or more of your applicational business logic via stored procedures and views that Joe Blow Webscale can't possibly fuck up or mess with, you know you are an A-Grade Web Developer.
The first reason to go with Oracle is its reputation. If you are responsibile for making a choice about which database to run, and you choose something that has the perception of being the second rate or the cheap option then if things go wrong and data is lost that decision might cost you, even if the data loss has nothing whatsoever to do with the quality or reliability of the database software. Is this unreasonable? It will depend on how conservative the organisation is. If it is a startup then they will be more comfortable with a open source database. If they are a financial organisation the licensce cost may be far less important than the perception of reliability.
The second reason to go with Oracle is lockin. Oracle DBA's in my experience have been trained to utilize the Oracle specific features of the product in such a way that moving to another database is impractical. Liberal use of stored procs, or even a decision to only use stored procs for data access has been a common theme. So has the idea that the business rules should be implemented in the database. All this does is couple your application to Oracle and lock you in. If you are buying an application the chances are that if they have developed against Oracle that you will have no choice about the database to run.
Oracle also has an ecosystem of professional support companies, and this too can provide an additional level of comfort for those making the decision about which database to run.
However, if you are like me and develop using a abstraction layer such as Hibernate, and refuse to write applications which tightly couple against specific flavours of database, you will retain the option of using Oracle if you or your customers choose, while keeping the door open to other options. My experience is that both MySQL and Postgresql provide a level of robustness at least equal to Oracle. They are far easier to install, do not require complex licensing, have highly experienced communities around them, as well as their own commercial support options.
There are features Oracle provides that have no PostgreSQL equivalent.
When you work for a big corp. and have the money to burn, it's all about shifting liability to a 3rd party -- the bigger, the better, hence the saying, nobody ever gets fired for buying IBM.
In turn, with the money you pay them, a big 3rd party will more than likely throw all the man power at your problem until it gets fixed.
So just because your shop is running Oracle, doesn't mean you can hire chimpanzees to write your font end code. Optimize your database design and queries and you can go a long way before you need the power of a commercial database system. Don't, and even the most advanced commercial database on the planet won't make your app suck any less.
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
I did now know about EnterpriseDB oracle compatibility for PostgreSQL, that is interesting.
However there is still a strong Oracle feature missing here, which is called CYA. It is just like using Microsoft software: even if it does not work nobody will tell you were wrong by choosing it
As much as I hate to admit it.. The Oracle stuff for the most part just works and if you have competent DBA's you don't have to worry about it. You may regret using oracle when you get the bill and sometimes it does not have the more esoteric features of the other DB's but you will be glad for its stability and its enterprise focused features in the long run.. And no one will sack you for choosing Oracle.
Like most DB comparisons, it depends on the workload, non-technical business factors, and more.
Oracle has superior clustering to PostgreSQL, better native XML support, autonomous transactions, procedures that can return multiple result sets, a really solid embedded JVM for procedures, proven scaling to absurdly huge database sizes, etc.
PostgreSQL has transactional DDL, generally better standards adherence, no lock-in, streaming replias that don't cost you anything, multi-language stored procedure support, extreme extensibility, proven scaling to multi-terabyte database sizes, and probably more I take for granted and forget about.
With Pg you get a lot of choice of support provider, including "none, I can do it myself and I can always contract someone if I need help". With Oracle you get support from Oracle, or from a vendor who must comply with what Oracle wants in order to get access to the resources they depend on to offer support.
PostgreSQL has no per-cpu or per-core license fees so you can run it on a lot more hardware. You can also afford to buy a much bigger server for the money you're saving on licensing fees and upgrade it more often. This can make a huge difference; PostgreSQL's performance is generally very good, and in areas where it does fall behind Oracle you can make up for a lot by throwing bigger hardware at the job. You also don't have to face NDAs, license audits, not being able to afford to have a second off-site hot standby backup machine, being stuck on old versions because licensing new ones is just too expensive, etc.
So, really, a huge amount of it depends on the workload, business requirements, etc.
I work professionally with PostgreSQL as a member of the 2ndQuadrant team, but if I'm discussing planning with somebody I'm still quite prepared to say "I don't think PostgreSQL will do the job as well as [blah] here given the time frame and requirements". It doesn't come up much but it has, and I'd be doing them a dis-service by saying PostgreSQL's perfect for everything all the time.
I find PostgreSQL to be the safe and sensible default, but I consider alternatives or supplements to it when I run into workloads it's not ready for or not great at - like someone who has a hard business or compliance requirement for synchronous multi-master clustering, or somebody whose query pattern and data set is going to be a better fit for Greenplum than native PostgreSQL.
In 95% of cases (or more) as one of the first response said: "stupid fucking managers", in 5% (or less) of cases, some very very very high-end features that almost nobody actually needs. Sorry, bathroom break is over, got to get back to the movie with the wife, otherwise I'd say more ;-)
But I'll leave you with this: the postgres folks are truly experts in database, and extremely forthright. Unlike the MySQL founders, if you go and ask this same question on the postgres mailing list, you will get an honest answer, not marketing bullshit.
Also, I see now that Craig Ringer has responded above. Anything he says, believe it ;-)
Enterprise DB is basically PostgreSQL
When all you have is a hammer, every problem starts to look like a thumb.
Ever try to store an array of strings? Better to store it as one field and parse it in code!
If you're trying to store complex data structures in SQL, I would recommend protocol buffers. Imagine XML, but more compact, and with built-in support for versioning. It's open source too.
"Once we've identified and embraced our sickness, we'll have strength...and that's when we get dangerous." - John Waters
In my opinion:
Oracle is easier to hire for. A lot of "reporting people" know Oracle. If they had half a brain in their head they could write SQL for any DB... but if they had half a brain in their head you'd have to pay them more.
Oracles support is... worse than anything. We just stopped calling. It's better to live with the bugs than waste man hours on that cunt licking whore Oracle calls support. I'd rather traverse the 7 layers of hell in a thong than ever talk to Oracle support about anything ever again.
Oracle is Satan. They will fuck you in the most evil way imaginable. Whatever alternative you think will get you away from them, half way through the migration project oracle will buy the alternative company out. If torturing puppies were profitable, Oracle would have a puppy torturing product as a SASS. In fact, if torturing puppies just made the product slight less helpful to you, they'd probably do it as well... because their favorite pastime is making their product of less value to you.
postgres uses MVCC, similar to oracle.
oracle uses an undo log and postgres a redo - the difference being that oracle is faster for multiple updates (and may be quicker to restart after a crash), but postgres doesn't suffer from running out of log space with large transactions, and rollback is very quick.
both postgres and oracle perform far better under locking scenarios than sqlserver.
recent postgres also have some very smart stuff if you use serializable isolation mode; supposed to be better than any other DB.
Done. Been handled natively by PostgreSQL for over a decade. Combine with pivots or windows for some really interesting stuff.
http://www.postgresql.org/docs/9.2/static/arrays.html
I used to work with Oracle pretty heavily in the 90s, and 7 years ago quite a bit...Solid database, but worth the money?
I consider PostgreSQL the best piece of software I have ever used. Given how much I have used it, this is saying a lot.
I remember reading on the old Slashy-Dotty some quote from some language-designer that I will now paraphrase:
"There are two kinds of languages: Those that people complain about, and those that nobody uses."
The point of this anecdote being that the more you use a tool and learn its nuances and flows, the more you find to bitch about.
I have been using PostgreSQL for over 10 years. And in this time I have found very little to complain about. I may have a handful of anecdotes about its failings, and most of those are mediocre complaints, at best.
It is a solid workhorse.
FWIW, when you're faced with the option, go with Postgres if at all possible. Oracle is a crufty mess that's painful black magic to administer. There's sufficient documentation out there that you CAN manage it, but it seems to be made up of nothing-but dark corners and ancient cruft.
I hate, hate, HATE always having to manually manage table spaces, data file size limitations, recompiling invalid objects, the HORRIBLE, painful, not entirely documented syntax of the tools (eg. expdp), the admin hostile tools that make the MS-DOS command-line look futuristic (sqlplus), etc. From an administrative perspective, Oracle is a nightmare in comparison to the relatively approachable and user-friendly Postgres.
Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
Now few people need that, but if you have a massive database, massive transaction rates, etc that can be the kind of thing you need a heavy hitter like Oracle to do. There are workloads that just aren't possible on lesser DBs. As I said, not all that common, but they are there.
Overall when it comes to the "free vs enterprise" type question there are three things I think you really need to look at:
1) Can you, or someone else really support the free solution, or is there GOOD support you can pay for if not? If you don't have a support contract, everything is on YOU. Make sure you weigh the cost of your (and other's time) and productivity vs the cost of a support contract. In the case of things like Postgres, you can find companies that support it, however they have a great range in their competence levels.
2) Are there any features you need that you have to trade off for the free stuff? If so, the enterprise stuff is probably the right answer. Don't assume you can just cowboy up a solution that is "just as good" because you probably can't. If you need those features, pay for them. However if all the features are either "don't care," "meh," or "nice but no biggie," then the free option can be a winner.
3) Can the free solution scale to the level that we are talking about (performance or size)? If not, then it is probably not for you.
So like with databases: Just hosting a single website? Hell ya use Postgres or MySQL. Oracle is not likely to buy you anything. However dealing with a 2PB data set that does hundreds of thousands of transactions per second, all of which is absolutely mission critical and has to be always online? Ya, you probably need something heavier hitting, and more reliable.
Your actual setup probably falls somewhere in between those big extremes. You need to determine where and thus what side it falls on.
One thing not to underestimate in some workloads is how well the procedural SQL is. Hopping back and forth from a program to the database is expensive, CPU wise, so in some cases you really need to do some procedural SQL for performance reasons. How well that works can vary DB to DB. If you have stuff like that, worth testing to see how it performs in other DBs. Does it have what you need to implement it, and how fast is it?
IT JUST WORKS. postgres and mysql do not even come remotely close to oracle. not by a mile.
they are simple RMDS Oracle is an application stack the db is only a small part of what oracle can do.
Linux modi 2.6.26-2-parisc
>>Last of all you need the executive board.
But, without the executive board, where would all the profit go?
Codifex Maximus ~ In search of... a shorter sig.
And herein lies the problem, each vendor has every incentive to lock customers in and no incentive to follow standards - a serious flaw of the market. And to make matters worse, most of the end customers are not technically savvy enough to realise the business risk of getting locked in to a proprietary system.
And then you get lots and lots of wasted effort trying to port and convert, which is extremely detrimental overall. And although the detriment of porting others code *to* your environment is bad, unless everyone changes at once those who change first will be at a disadvantage.
Which is why you need big buyers (eg governments etc) to demand standards compliant products, and refuse to purchase anything which isn't. Some may see it as interfering in the market, but then this aspect of the market is fundamentally flawed.
http://spamdecoy.net - free throwaway anonymous email - avoid spam!
I've been a relatively mild-mannered open source advocate for over 20 years now, and have been running Linux for all of it. My first DBA job was with Postgres (6 or 7, ~12 years ago now!) and now Oracle. This is all about databases, completely ignoring the application related acquisitions they've made in the last decade...
A lot of difference I see and is evident from the discussions here is that Oracle usually has the features earlier (not always, but yes, usually). The earliest example I've witnessed is Postgres' Write-Ahead Logging, which was definitely cool, but Oracle were there first. More recently, with 11gR2 you have advanced compression (pay $$$$ and it will store all your data compressed if you want) and with 12c there are a bunch of features that make me drool. Pluggable databases is just one of them.
Again, not entirely sure about Postgres, but Oracle build a lot of instrumentation into the database software itself. Tracing custom events is a great way of profiling your application as well as database deficiencies. Pay for the license to unlock the full power of ASH or AWR and you have a great deal of ability to see exactly what's going on and figure out how best to resolve any performance issues. The best bit is that this instrumentation doesn't make the database run like a dog. A few percent overhead gives you a lot of debugging power, and it's ALWAYS turned on with basic event tracking always happening anyway. But you can add MOAR.
I see some impressive performance on Oracle databases these days, but not entirely convinced that Postgres cannot meet them. But then, Oracle can run on anything from 32 bit x86 to some seriously beefy hardware (and when it does, it runs well). I'm not entirely sure about Postgres, but I know Oracle has been compiled for RISC architecture (Power, SPARC, HPUX, others??) for a long time. These days they to lean towards x86 - and will even sell you a "database machine" (google for Exadata). This extends to scaling out on any of the supported architectures with their cluster software (Grid Infrastructure) these days, which is quite mature now. Again, Postgres probably does this, but each generation sees a significant improvement for Oracle.
Having said all that, leading edge can also be bleeding edge... The biggest problem for me with Oracle continues to be the time it takes to resolve software bugs combined with their support infrastructure. While it usually gets there in the end, for the price you pay for enterprise support one might expect quicker resolution if you happen to be the first person to hit upon a specific problem. Unfortunately this tends to tie with the need to certify with all the Oracle applications they release and support. The one and only bug I reported when I was a Postgres DBA was around a date calculation issue - from the behaviour I reported it was tracked down and patched in ~ 2 days, and I had a workaround for the meantime anyway.
Oracle have also done some cool stuff in the open source domain with OCFS (and now OCFS2) and the free domain with their base GI cluster software, as well as the plain cool domain with ASM (dynamically manageable disk pooling with Stripe And Mirror Everything methodology providing solid data robustness) and ACFS which lets you carve out clustered POSIX compliant filesystems on top of ASM at will. This all helps with scaling (don't need OCFS2 now if you use ACFS tho).
Hmmm, it seems they really are turning me to the dark side.... heeellllllppppp!!!!
This isn't just about Oracle. Everyone decides to do things differently because they each evolve in a vaccum and then once standards do come along, those standards bodies don't have any balls.
If you can't point to a relevant standard that Oracle is ignoring then you have no leg to stand on. That doesn't just go for Oracle but it applies to any other vendor.
Oracle has some features from the mid 90s that competitors are just getting around to implementing now. Sometimes you just have to make something up because there isn't a standard there yet.
A Pirate and a Puritan look the same on a balance sheet.
And herein lies the problem, each vendor has every incentive to lock customers in and no incentive to follow standards - a serious flaw of the market.
Not exactly. The dominant player has this motivation. Smaller players have the opposite -- make their stuff as much like the big dog so they can more easily poach customers.
William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
TOAD doesn't help me do an impdp from a file.
TOAD doesn't allow me to make a change to 6 different RACs at the same time, but a command-line tool can be pretty easily scripted to do so.
In short, Oracle is still quite painful even with TOAD. And for those without the money (or that don't want to use Windows) there is also TOra.
Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant