Re: POSTGRES/MYSQL

From: Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Sonam Sharma <sonams1209(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: POSTGRES/MYSQL
Date: 2019-03-11 18:21:48
Message-ID: CADp-Sm51XRw1gmifNfT16qyv7yo1-QOumjpwPs4djzDS2oALkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue 12 Mar, 2019, 1:58 AM Adrian Klaver, <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 3/11/19 9:31 AM, Sonam Sharma wrote:
> > Hi Adrian,
> > Ours is retail company and the DB size is Max 30gb, currently we are
> > using db2.
>
> Things to consider:
>
> 1) Migration tools for DB2 --> MySQL/Postgresql. I have not done this,
> so someone else will have to comment.
>

This will be fairly simple for a 30gb database if you can afford some
downtime. I have some bit experience with this (DB2 9.7 to PostgreSQL). You
can use db2look to export the DDL out and then do some minor modifications
and run the SQL (more or less) as is on Postgres.

Use "db2 export" command to export data in CSV format (separate file for
each table).

Use Postgres COPY command to copy data from CSV format.

Make sure that you set PostgreSQL client encoding to something that aligns
with database codepage on DB2 and LC_LANG setting. If DB2 is hosted on AIX
or Linux, avoid using a Windows client to fire db2 export. Migrating off
from Windows could be tricky. The codepage and encoding issues might need a
few retries to align. So pls test in UAT with prod like data sample.

> 2) The clients/frameworks/ORMs you use now to connect to the database.
> Do they also work with Postgresql/MySQL?
>
>
> >
> > On Mon, Mar 11, 2019, 8:21 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> > <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
> >
> > On 3/11/19 4:31 AM, Sonam Sharma wrote:
> > > Hi All,
> > >
> > > We are planning to migrate our database into any open source DB.
> > > Can someone please help me in knowing which one will be better
> among
> > > POSTGRESQL and MYSQL.
> > >
> > > In what terms postgres is better than MYSQL.
> > This cannot really be answered until more information is provided
> about
> > how your current database is used and how you want to continue in the
> > future.
> >
> > >
> > > Regards,
> > > Sonam
> >
> >
> > --
> > Adrian Klaver
> > adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
> >
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
> --

--

Best Regards,

*Sameer Kumar | Senior Solution Architect*

*ASHNIK PTE. LTD.*

36 Robinson Road, #14-04 City House, Singapore 068877

T: +65 6438 3504 | www.ashnik.com

Skype: sameer.ashnik | M: +65 8110 0350

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Perumal Raj 2019-03-11 18:51:50 Autovacuum Transaction Wraparound
Previous Message Adrian Klaver 2019-03-11 17:58:45 Re: POSTGRES/MYSQL