Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Databases Businesses Oracle Software

Ask Slashdot: Is Postgres On Par With Oracle? 372

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?"
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Is Postgres On Par With Oracle?

Comments Filter:
  • by Anonymous Coward on Friday July 12, 2013 @09:04PM (#44266789)

    Stupid fucking managers

    • by KitFox ( 712780 ) on Friday July 12, 2013 @09:23PM (#44266903)
      Append "with no technology knowledge who met salespeople." and you're set.
    • by Anonymous Coward on Saturday July 13, 2013 @01:05AM (#44267887)

      Without whom you would likely be living in a hovel.

      If your superiors decided that an Oracle solution was best, then it most likely was.

      Sadly it seems you've let your jealously over compensation cloud your mind. My only advice is to remember that, when it comes to operating a business, IT workers are helpful but it is the managers who do the grunt work and take the real risks.

  • by KernelMuncher ( 989766 ) on Friday July 12, 2013 @09:06PM (#44266801)
    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 (Score:5, Insightful)

      by Anonymous Coward on Friday July 12, 2013 @09:17PM (#44266853)

      MongoDB, run away, run away quickly if you need anything close to ACID or XA.

      • by Maudib ( 223520 )

        Mongo is ACID compliant at the document level.

        Its not the right choice for everything, but defaulting to "run away" is just nutters.

        • by Billly Gates ( 198444 ) on Friday July 12, 2013 @10:00PM (#44267105) Journal

          "Mongo is ACID compliant at the document level."

          But not where it counts [youtube.com].

        • by interval1066 ( 668936 ) on Saturday July 13, 2013 @12:39AM (#44267817) Journal
          MongoDB IS NOT acid compliant as far as enterprise is concerned, and its not meant to be. Use a spanner where a spanner is nessessary, and a hammer where a hammer is nessessary.
          • Re:MongoDB--run away (Score:4, Interesting)

            by lgw ( 121541 ) on Saturday July 13, 2013 @02:12PM (#44270609) Journal

            MongoDB can't be beat for "store it now, figure out what to index later" data, especially log files. It's probably the best tool for that job.

            Where there's a gaping hole in available software, either open source or commercial, is a solution for cloud-scale commodity-server DB sharding solutions. If you know how to partition your data (such that the only queries that need to run across partitions are map-reduce-style queries, and everything ACID stays insdie one partition per query), it should be off-the-shelf easy to do that with 10 or 10000 cheap database servers.

            But that's all homebrew now. AFAIK, all the big cloud players other than Google work that way for the non-logfile data. E.g., Facbook uses sharding over MySQL. But everyone has rolled their own, and no one has open sourced it or made a product from it. It's very strange.

    • by Eravnrekaree ( 467752 ) on Friday July 12, 2013 @09:50PM (#44267063)

      Dont torture yourself trying to use some unusual paradigm in order to implement something in some faddish, newfangled NoSQL database when doing it in SQL will be easier, especially because someone heard some hype about something like MongoDB and thinks it must be used without really understanding if it is really better than SQL.

    • by Darinbob ( 1142669 ) on Friday July 12, 2013 @09:59PM (#44267101)

      This is the best thing about SQL: it's a standardized language letting you switch between different database vendors with fluidity.

      (and how says irony is dead?)

      • Yeah! And while we're at it we can use Java EE 6, which makes it super-easy to write apps that'll run on any of the portable Java application server runtimes!

        People who think SQL is really a meangful standard haven't used more than one SQL RDBMS. Even basic read-only querying and DML is in practice only marginally standard. For example, Oracle doesn't support multiple VALUES lists, it has its own funky syntax for multi-valued insert, which is one of the more basic things around.

    • by Pedahzur ( 125926 ) on Friday July 12, 2013 @10:52PM (#44267321) Homepage

      EntepriseDB has a compatibility layer that lets you drop an Oracle application on top of PostgreSQL and run it (nearly) unmodified.

      See http://www.enterprisedb.com/solutions/oracle-compatibility-technology [enterprisedb.com] for more.

    • 2ndQuadrant, who I work for, have some PL/SQL conversion and compatibility tools in the works and are interested in hearing from more people with large PL/SQL codebases.

    • A big code base in PL-SQL I guess that nobody wants to re-write

      PL/SQL compatibility is EXACTLY what EnterpriseDB offers, for a price vastly lower than Oracle.

  • previous life (Score:3, Interesting)

    by Anonymous Coward on Friday July 12, 2013 @09:20PM (#44266875)

    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.

  • by jbolden ( 176878 ) on Friday July 12, 2013 @09:22PM (#44266895) Homepage

    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.

    • by Nerdfest ( 867930 ) on Friday July 12, 2013 @09:25PM (#44266919)

      Oracle's complexity and vendor lock-in is a minus to the extent that if there is *any* other way to solve the problem, including using MS-SQL, Sybase, or even DB2, use the alternative.

    • by Anonymous Coward on Friday July 12, 2013 @09:30PM (#44266943)

      Index only scans exist in Postgres 9.2, so I imagine your comparison here is quite out of date

      • by Meetch ( 756616 ) on Saturday July 13, 2013 @10:36AM (#44269497)

        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!!!!

    • by kuhneng ( 241514 ) on Friday July 12, 2013 @09:58PM (#44267095) Homepage

      Index only scans were added to postgresql (some caveats) in 9.2. The optimizer is cost/statistics based, though perhaps marginally less mature.

      What I miss are strong partitioning support, implicit query parallelism, incremental backups, clustering (RAC), and materialized views. Most / all of these features matter primarily for reporting / analytic workloads.

      PostgreSQL is a superb database, and dramatically easier to work with and manage than Oracle on a day to day basis. For transactional workloads at anything but the largest scale, it's excellent. On reporting and analytic workloads, it hits the wall much earlier but is still a good option for many needs.

      • I'd mod you up if I had mod points... I'm no fan of SQL, but I likely will use postgres on my next project where I have the freedom to choose.

      • by hibiki_r ( 649814 ) on Friday July 12, 2013 @10:14PM (#44267163)

        There's also the Evil Oracle Magic that lets you change query plans on the db directly, if Oracle itself is unable to come up with the best plan. In Postgres, the database is expected to figure everything out based on costs and statistics, which works well most of the time, but will kill you for specific kinds of queries. For instance, if you have 4 where clauses in different tables, postgres' static analysis will have no idea of whether each extra clause is any more or less selective than it'd be vs the entire dataset. If this is not the case, Postgres can make very wrong assumptions about how many rows you'll fetch, and thus come back with very silly query plans.

        In Oracle, you have a chance of being saved by the fact that the optimizer learns from this kind of mistakes, or, in the worst case scenario, the DBA can just assign a very specific plan to your query on the fly, which leads to great performance gains without having to change code. Postgres keeps getting better in every release though, and Oracle's licenses are not getting any cheaper.

        • by greg1104 ( 461138 ) <gsmith@gregsmith.com> on Friday July 12, 2013 @11:21PM (#44267491) Homepage

          There are a some ways to force a query plan onto Postgres that works effectively as hints. See my Hinting At PostgreSQL [2ndquadrant.com]. It's also possible to overide how Postgres runs selectivity functions to get different results. That mechanism is powerful enough that you can do almost everything possible with hints and then some. The problem is that it's too difficult for most to develop their own statistics model just to fix a broken query. When the alternative is sucking on everything Oracle makes hard, I can't understand why people aren't willing to do this the right way sometimes.

      • by CBravo ( 35450 )

        You know about postgres-xc ?

    • by Anonymous Coward on Friday July 12, 2013 @10:20PM (#44267187)

      For what it's worth, 9.3 is getting materialized views.

      • by jbolden ( 176878 )

        postgres has been getting better and better all the time. Just like MSSQL the percentage of databases which it can't handle keeps going down. DB2 and Oracle are being forced into narrower and narrower niches.

    • by denmarkw00t ( 892627 ) on Friday July 12, 2013 @10:35PM (#44267243) Homepage Journal

      Flashback queries and flashback archives (they are really cool)

      This this this. Working with Oracle was very interesting at a few years back. Odd things, like not being able to do a LIMIT, OFFSET in an easy mannor (read: any way but LIMIT, OFFSET) was so strange - the DBAs explained it as something to do with how Oracle manages row count and the uncertainty of the rows returned? idk, it's been a while. They did give us a way around...but, I digress.

      Flashbacks are nasty cool - the way I understand it, as I was only watching the dev who about two hours before had hosed a production database, is that you can SELECT INTO FROM a point in time. We had a DBA on the line who walked him through the flashback, and before we knew it, the DB was back to the state it was in hours before.

      HOWEVER. Go with Postgres. Stick with Postgres. No reason to shell out all that cash for licenses, and Postgres is powerful enough to do just about anything you need it to, imho.

      • by greg1104 ( 461138 ) <gsmith@gregsmith.com> on Friday July 12, 2013 @11:23PM (#44267511) Homepage

        It doesn't have a slick UI, but you can do the same thing as Flashback on Postgres. You take a base backup of the database and regularly save write-ahead log files. When you need old data, you have to spin up a new database instance, ask it to replay to that point, and then get the data into the original instance. It won't win any design awards, but I recover lost data with this technique all the time.

    • by MacDork ( 560499 ) on Friday July 12, 2013 @11:30PM (#44267533) Journal

      Off the top of my head, the sort of thing you don't get with Oracle:
      select * from table limit 10 offset 20;
      source code
      free

      I recently benchmarked postgres 9.2.4 on a Dell PowerEdge at Rackspace with a four disk raid 10, a two disk raid 1 for the WAL logs, and 48GB of RAM. It's good up to around 14000 transactions per second until you exceed what fits into RAM. Then it drops off to around 2000. That was the select benchmark with no writes involved.

      grahamsaa, if you really want to know what postgres can do, I suggest you install it and run some benchmarks to find out for yourself. You can find all the info you need to do this in Postgresql 9.0 High Performance [amazon.com] It won't cost you anything to do this and if you decide it can't handle your workload, then you can always go purchase Oracle.

      • Re: (Score:3, Informative)

        by magman ( 1036252 )
        Oracle database version 12c does limit, offset and these things: http://docs.oracle.com/cd/E16655_01/server.121/e17209/statements_10002.htm#SQLRF55636 [oracle.com]
      • I recently benchmarked postgres 9.2.4 on a Dell PowerEdge at Rackspace with a four disk raid 10, a two disk raid 1 for the WAL logs, and 48GB of RAM. It's good up to around 14000 transactions per second until you exceed what fits into RAM. Then it drops off to around 2000. That was the select benchmark with no writes involved.

        Note that much of this is tracing the physical limits of the hardware moving pages around memory and/or disk, not usually Postgres itself anymore. I've been tracing this shape of curve for years now [westnet.com]. If you don't want the fall-off against larger than RAM workloads to happen so fast, you can use faster storage like SSD to pull that upwards a lot. Just have to make sure the storage supports reliable writes [highperfpostgres.com], which means only a few models of SSD--Intel's 320, 710, and DC S3700 models are popular.

        In older ver

      • by flink ( 18449 )

        Off the top of my head, the sort of thing you don't get with Oracle:
        select * from table limit 10 offset 20;

        select a.* from table a where rownum >= 20 and rownum < 30

        It's a little more complex in practice, but not too difficult once you know the idiom.

    • by RedLeg ( 22564 )

      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.

      I could not have said it better. To get your money out of Oracle, you must have a seasoned, professional DBA, usually two or more (production / development). Further, Oracle really takes advantage of higher end hardware, and that takes a different kind of dba experience and expertise to optimize. You're probably on it for a good reason, particul

    • Oracle has more features than PostgreSQL, no argument here. But Postgres development seems to b more agile, and these guys are catching up fast:

      Materialized views (and all the related magic)

      Partially there, more features to appear soon.

      Index only scans (can be a major performance boost)

      Available in PostgreSQL too.

      Oracle uses a statistical optimizer for execution plans in the engine.

      So is Postgres.

      • by jbolden ( 176878 )

        Oracle has more features than PostgreSQL, no argument here. But Postgres development seems to b more agile, and these guys are catching up fast:

        No question. In 2000 Postgres was just incredibly slow. There was almost no Postgres applications that wouldn't have been better under Oracle excluding cost issues. The feature differences were tremendous. Today the differences are limited to a very small number of databases, Oracle is a niche product.

  • It Depends (Score:5, Insightful)

    by djbckr ( 673156 ) on Friday July 12, 2013 @09:24PM (#44266909)

    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...

    • Re:It Depends (Score:5, Insightful)

      by Nerdfest ( 867930 ) on Saturday July 13, 2013 @12:07AM (#44267663)

      The problem with PL/SQL is that you're not really using it as a database anymore, you're using it more as an application, and you're tied to Oracle (Pro Tip: This is bad). If you're not really using it as a database, perhaps a language more open and flexible is more appropriate to your needs.

    • 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? I

  • by l0ungeb0y ( 442022 )

    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 p

    • by Maudib ( 223520 ) on Friday July 12, 2013 @09:30PM (#44266945)

      Yes. Great developers use lots of...stored procedures?!?!?!?!

      What fucking planet are you from?

      • by Hairy1 ( 180056 ) on Friday July 12, 2013 @09:47PM (#44267051) Homepage

        Planet Oracle I believe. It is exactly this condesending attitude which we can do without. It is the same propoganda that the business rules should be in the DB so they are protected from the idiot know nothing developers. It is a claim in essenence that a DBA is superior and developers incompetent. There is such a thing as a business layer. The business rules can be enforced there. I know the orthodox thinking, but have never seen a good reason to believe it. I don't know how much time has been wasted on projects with developers fighting DBAs just to get their job done. Yes - stored procs do potentially have a role. In my experience it is a very limited role.

        • by casings ( 257363 ) on Friday July 12, 2013 @10:05PM (#44267129)

          Have you ever worked for a truly large company? I ask because you seem to trivialize the politics of the environment.

          You are talking about cushy jobs for most of these people so there is incentive to CYA. You also have separate teams who report to separate managers who each control a layer in the application. You have the dba teams, the mainframe teams, the noc team, the platform team, the framework team, the other framework team, the application teams, the qa teams, the internal client teams, etc. If you looked at it from their perspective these people don't necessarily want to allow some wet behind the ears application team (because thats usually who are working at this layer anyway or worse offshore) to have so much control over what is essentially very proprietary business information. Can you really blame them though? If you're some medical company who deals with patient information, and you have HIPAA obligations, perhaps it can start to make sense? Even worse if you are publicly traded because then you have to deal with SOX.

          Not to mention that there are many positive reasons to use stored procedures in general. Such as the ability to encapsulate your data structures in the database allowing you to change schema without affecting the application layer. Or allowing DBAs to identify areas to increase performance through indexes, etc. since they know every single query being run on their database. Or simply reducing round trips between the application layer and the database layer. Or increasing quality of code by inherently using transactions thereby hopefully reducing times when the database is in an incorrect state and not relying on an application developer to get that right. Also creates a uniform platform when you have multiple application teams. What about simply using stored procedures allowing your application to potentially switch database software with minimal code change, if written correctly.

          There are many good reasons to use stored procedures.

          • by t0y ( 700664 )
            And because of the office politics stored procedures are good? Man... the DBA you describe is a developer. It's just that instead of using .net or java he's trapped in PL/SQL or T-SQL nightmare.
        • by jythie ( 914043 ) on Friday July 12, 2013 @11:12PM (#44267423)
          If you are fighting your DBAs to get the job done, your problem is political not technological. A good DBA and a clear separation of domains can make a developer's life easier and let them focus on the parts they are building.
        • by Kjella ( 173770 )

          All of our "business rules" are in the database and the reason is speed. Without going into too much detail we receive many and huge chunks of data from external parties and our job is to process these for quality, everything from whether the dates are dates to complex relationships between many values/existence checks in many tables. And I'm not talking about simple IT rules, there are teams of subject matter experts dedicated to finding new forms of invalid and improbable combinations and it is not feasib

      • Well actually, to be blunt about it, I am from Earth.
        But an alternate reality where we might use stored procedures with triggers to check shit and validate and roll back.
        That is my most common usage scenario.

        Yes, you can put that all in the middle tier -- but that can all be broken in the middle tier.

      • by SDrag0n ( 532175 ) on Saturday July 13, 2013 @12:22AM (#44267739)
        There is such a thing as a database developer. You know why stored procedures are awesome? It's because letting a database engine use relational math properly can make thing wildly fast. The real problem is most application devs think they know all there is to know about databases but typically they barely even understand how an RDBMS work at a high level. With that though, don't let me stop you from running some query, copying a bunch of data across a network to load and process by an application, and then send some response back across the network to run another query to do something simple.
      • Sometimes, Oh hell yes...

        SP are much faster, more efficient and flexible than fixing up the third party's munted Tomcat application.
        This bloated rubbish is one of the only applications that fulfils the brief but there is absolutely no stored procedures or views, making it a slobbering mess speed wise.

        Of course the business logic is better hidden, which is why I believe they did it that way.

  • Why Oracle? (Score:5, Insightful)

    by Hairy1 ( 180056 ) on Friday July 12, 2013 @09:26PM (#44266925) Homepage

    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.

    • Re:Why Oracle? (Score:5, Insightful)

      by glenebob ( 414078 ) on Friday July 12, 2013 @09:42PM (#44267021)

      I wrote against Postgres for years and avoided stored procedures as much as possible for exactly the reason you describe; to avoid lock in. I never understood why so many people are perfectly happy to dive right into lockedinville. Avoiding lock in always served me and my company well.

  • by mysidia ( 191772 ) on Friday July 12, 2013 @09:32PM (#44266957)

    There are features Oracle provides that have no PostgreSQL equivalent.

    • Price -- it costs a lot of money. For many governmental entities, this is a huge advantage -- as they are given a budget, and they need to spend it, otherwise their budget will get reduced -- if its an excuse to spend money, based on claims of productivity, they will often deny requests to use OSS, and mandate the use of Oracle, based on its productivity-improving and more-reliable qualities that some slick salesman persuaded them of, after taking them out for steak at a 5-star restaurant somewhere, or whatever. Also; I hear plenty of government workers saying Management has a no open source software policy; for security reasons, the more money spent on the product the better, as closed source code is deemed to be more secure... For me, and business i'm involved with, this is a huge negative for Oracle, and a reason I almost always pick Postgresql; yes, Oracle delivers more, BUT in many cases you pay Oracle for every extra cent of additional incremental value Oracle delivers over Postgres, and maybe 300% more.
    • RAS features -- such as clustering Oracle RAC [wikipedia.org]
    • Development productivity tools such as - Pro*C [wikipedia.org]
    • SQL Language features where Oracle's implementation is superior -- such as BLOBs. Postgres manages these poorly, for example, you cannot reliably pg_dump blobs - if your application is BLOB happy (e.g. Sharepoint-like), then Postgres is not very suitable.
    • SQL Language features that have no PostgreSQL analog -- such as CONNECT BY [psoug.org] clauses, Java [oracle.com] class based schema and table mappings; module languages; XML types; default value funciton parameters; organize stored procedure objects using packages; .
    • You're omitting a key concept about price that I've seen many fools around me exploit. If they are managing a big project that has software costs of millions a year then they must be very important. If I'm managing a project that only costs the company a hundred thousand or so in software costs a year then I must be less important. It really doesn't seem to matter if my project does more or is actually more critical to the operation of the company, those are concepts that are too abstract for upper manageme
    • by Craig Ringer ( 302899 ) on Friday July 12, 2013 @11:16PM (#44267457) Homepage Journal

      PostgreSQL supports the SQL-standard WITH RECURSIVE clause instead of the Oracle-specific CONNECT BY.

      CONNECT BY is in many ways a nicer syntax, but the functionality is there.

      Pg also has XML types, schemas and extensions to serve some of the same purposes as packages, etc. Default values of function params are also supported.

      That's not to say it has full coverage of Oracle's feature set; it doesn't. There's no native materialized view support until 9.3, so you have to roll your own in currently released versions. There's no synchronous multi-master clustering in Pg (we're working on it). No autonomous transactions, and stored procs can't easily return multiple result sets. Partitioning in Pg is rudimentary and manual, at least in 9.3 and older, it might change in future.

      OTOH, Pg is more extensible, has saner licensing, offers choice of support, etc, per my other post.

  • Liability (Score:4, Insightful)

    by InfiniteZero ( 587028 ) on Friday July 12, 2013 @09:38PM (#44266997)

    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.

    • And the story of shifting liability is such a sham. Oracle isn't liable for anything. If you install Oracle and lose a bunch of data, you're still liable for it. And even if Oracle was liable, is that going to get your data back? No.

  • Probably Not (Score:5, Informative)

    by Greyfox ( 87712 ) on Friday July 12, 2013 @09:46PM (#44267047) Homepage Journal
    But most shops don't need something as powerful as Oracle. By the time they get done slapping a front end with non-optimized spring and hibernate queries on top of oracle, they may as well just be storing their entire database in one big XML flat file. A while back I ran across a developer who was trying to join two tables manually using hibernate. Around 40000 records his application would run out of memory and crash half an hour later. The SQL join I wrote to test it handled at least 1.5 million records and ran in under 10 seconds (And this was on a Postgres database.)

    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.

    • Hibernate is a great tool in many ways, but it is far too easy to allow the actual details of what is going on under the covers to be hidden. As the parent suggests using Hiberate in a naieve way can be very dangerous. Complex queries are usually best handled by native SQL.

  • Like you install netbackup on it or one of the other enterprise products And it backs up directly to your tape robot via the San. No shutting down the database. No copying to a snapshot. Online backup of the production db straight to tape. Full, diff and log backups straight to tape.

    Does it support online restore?
    Is it certified for VMware and hyper-v?
    If you have a problem can you open a support case right away?

  • by manu0601 ( 2221348 ) on Friday July 12, 2013 @10:03PM (#44267119)

    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

  • by Craig Ringer ( 302899 ) on Friday July 12, 2013 @11:01PM (#44267377) Homepage Journal

    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.

  • by sribe ( 304414 ) on Friday July 12, 2013 @11:13PM (#44267427)

    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 ;-)

  • Imo (Score:4, Informative)

    by Charliemopps ( 1157495 ) on Friday July 12, 2013 @11:32PM (#44267545)

    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.

Our OS who art in CPU, UNIX be thy name. Thy programs run, thy syscalls done, In kernel as it is in user!

Working...