Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mladen Gogala Newsgroups: comp.databases.postgresql Subject: Re: migrating oracle to postgres Date: Mon, 20 Jun 2011 20:08:08 +0000 (UTC) Organization: solani.org Lines: 77 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1308600488 17507 eJwFwQkBwDAIA0BLo4UAcsYT/xJ6ZxeCdoVBjcbfG5L02aPTXhHgyVu1hEhGh35hMaBqsfYBJdYRgw== (20 Jun 2011 20:08:08 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 20 Jun 2011 20:08:08 +0000 (UTC) User-Agent: Pan/0.133 (House of Butterflies) X-User-ID: eJwNxcEBwCAIA8CVgBiM41SU/Uew9zkiPWuOZA42O6ZCf/EZCxJLZ8MMyBJi31l2fZ3y0EL7AwDjED8= Cancel-Lock: sha1:1EuLovbv2LQ4ssAaHqGTaHUrfjw= X-NNTP-Posting-Host: eJwNyMkRACEIBMCUBDkkHGRn8g9h/XW175CYtPAwp9NGq5pK31/ledJGLU5iwQBBd0r0PXh99QcsuxH3 Xref: x330-a1.tempe.blueboxinc.net comp.databases.postgresql:134 On Mon, 20 Jun 2011 19:28:45 +0200, Username wrote: > Hello group, > > we are facing the task of migrating a large (600k LOC) oracle backend to > postgresql. As i figured out by now is that we theoretically have two > options: > > 1. teach Postgres to understand PL/SQL by using 3rd-party-software 2. > convert oracle PL/SQL to PG PL/SQL > > Has anyone of you already experience with such a job? Where are problems > to be expected? > Are there some tools for automated translating oracle PL/SQL to PG > PL/SQL? How good are they? > Are there other options except the two above? What option is to be > preferred? > > ....and many, many more... > > Thank you in advance. > > Thomas I've had such a pilot project but was forced to give it up. There are several major snags with Postgres: 1) Postgres is the only major database without hints. That makes keeping any deadlines impossible and makes it necessary to rewrite each and every SQL. Tuning SQL in Postgres is done by rewriting it and fixing the model, which takes time, in my case more time than I was alloted. They do have "set mode" statements for the session, but that's in effect for the entire session. Granularity is wrong. 2) Postgres partitioning is not very robust. It's even weaker than Oracle7 partition views because partition elimination only happens during the parse phase. Once the statement is parsed, that's it. Did I mention that there are no global indexes? Also, optimizer seems to be confused with partitioning and is frequently producing bad plans, based on the full table scan of the entire table. 3) The most important problem are the people leading the community. They stubbornly refuse to even talk about hints. Also, there is a closed source version of Postgres, called EnterpriseDB which has hints. One of the pillars of Postgres community is a guy who works for EnterpriseDB and is opposed to hints in the open source version but is merrily selling them in the closed source version. Here is a pearl of wisdom, contributed to this valley of tears by another shining pillar of the Postgres community: http://tinyurl.com/68gu822 To dispel any doubts, I am the DBA that this genius is talking about. 4) Postgres optimizer is bad. Statistics anomalies are frequent, there is an email list devoted to Postgres performance and every other question is "how to speed up this query". There is no tuning methodology, no event interface, nothing. 5) There is no parallelism. Oracle can parallelize queries, Postgres can not. It's as simple as that. There is no cure in sight. There are some other problems, like not caching parsed SQL (no shared pool) but these were sufficient to cast serious doubt on Postgres as a viable option. I am an Oracle DBA for more than 20 years and recent changes in the pricing policy have motivated the company that I work for to look for alternatives, starting with OSS software. Sadly, there are no open source alternatives. The spirit in the Postgres community ensures that things will remain as they are, for the foreseeable future. The next step is to look for the commercial alternatives, like DB/2. However, if you are building a data warehouse, take a look at MongoDB. It's a NoSQL database which can be used to create a very decent data warehouse. If you want to rewrite Oracle code and use it on Postgres, forget it. It's going to be a frustrating and humiliating experience and will produce an underperforming application system. You can contact me directly, should you need any more information. -- http://mgogala.byethost5.com