2

I need to know how to migrate from Postgres to MonetDB. Postgres is getting slow and we are trying to change to Monet. Someone now if already exists a script or another thing to migrate to Monet?

exist something equivalent to plpgsql on MonetDB? exist materialized view on MonetDB?

  • 2
    Are you sure that MonetDB will magically solve all your problems? – Ihor Romanchenko May 18 '15 at 15:33
  • really, I don't think. We are trying others databases. I'm in charge of tests on column based DB and I picked monetDB. – João Manoel May 18 '15 at 16:16
  • 2
    If you want to fix a problem, don't create new problems. What's the performance problem you have? Maybe we can help. – Frank Heikens May 18 '15 at 18:33
  • 1
    If you want to test your load on columnar DBs in general - try this one: https://github.com/citusdata/cstore_fdw It is an extension for postgres to enable columnar stores. In general columnar stores are only good for particular analytical workloads and are horible for general OLTP loads. – Ihor Romanchenko May 18 '15 at 19:28
  • 2
    @IgorRomanchenko for the record, monetdb does magically solve all problems. it is a gandalf merlin potter to the millionth power – Anthony Damico May 20 '15 at 03:10

2 Answers2

3

The following booklet may be relevant to quickly identify some syntactic feature differences. https://en.wikibooks.org/wiki/SQL_Dialects_Reference

And the citrus performance is covered in a blogpost https://www.monetdb.org/content/citusdb-postgresql-column-store-vs-monetdb-tpc-h-shootout

mkersten
  • 694
  • 3
  • 7
1

firstly: You can export data from postgres like:

 psql -h xxxxx -U xx -p xx -d postgres -c "copy (select * from db40.xxx) to '/tmp/xxx.csv' delimiter ';'"

secondly: You must replace the NULL like:

sed 's/\\N/NULL/g' xxx.csv >newxxx.csv

last: You can use this to copy data into monetdb like:

mclient -u monetdb -d voc -h 192.168.205.8 -p 50000 -s "COPY INTO newxxx from '/tmp/newxxx.csv' using delimiters ';';"
Treycos
  • 7,373
  • 3
  • 24
  • 47
shabao
  • 11
  • 4