Oracle to PostgreSQL Migration with ora2pg, analyse migration speed with R

In PostgreSQL by Alexander Dobriakov

There are multiple options to migrate your database from Oracle® to PostgreSQL. One of the simplest and flexible one is to use an open source tool ora2pg. It is well documented and does its job as expected. You can run it with a verbose output option to get more feedback during migration. At the end of first probe run, I wanted to identify tables, which took the most time for the migration to optimise it with a multiprocess option. Below is the output sample from ora2pg COPY run (DATA_LIMIT=10000):

It is pretty strait-forward to parse useful information out of it with open source command line tools:

The R script toptables.r to aggregate log data:

Results output:

The next step was — to parallelise migration of the biggest tables with JOBS and ORACLE_COPIES options on 8 vCPU host:

Voilà! Data migration runs faster now. Have fun and comment about your experience with ora2pg.