Re: [GENERAL] syncing with a MySQL DB
Brandon Metcalf escribió: m == [EMAIL PROTECTED] writes: m> On Tue, Oct 21, 2008 at 9:54 AM, Brandon Metcalf <[EMAIL PROTECTED]> wrote: m> > m == [EMAIL PROTECTED] writes: m> > m> > m> On Tue, Oct 21, 2008 at 9:07 AM, Brandon Metcalf <[EMAIL PROTECTED]> wrote: m> > m> > I have a need to keep a PostgreSQL and MySQL table synchronized. My m> > m> > thoughts are to use triggers on the pgsql side to manipulate the MySQL m> > m> > table when data in the pgsql table is changed. I also plan on using m> > m> > PL/Perl to write the functions. m> > m> > m> > m> > Are there better ways to achieve this? m> > m> > m> have you looked at dbi-link? m> > m> > m> > No, but just did and it looks very cool. Have you used it before? If m> > so, would you mind if I ask you some questions? We could take it off m> > the list if that's more appropriate. m> i'm not a perl guy...hop on postgresql irc and ping 'davidfetter' :-) OK. I'll dig in and can probably figure everything out. I'll contact David if I can't. Thanks. Maybe you can use too a multi-master replication solution that supports mysql and postgresql like symmetricds, http://symmetricds.sourceforge.net , it is developed in java and can works like a library or a daemon, i am using now between postgresql machines but it supports replicate heterogeneous database (a common usage in the forums it is oracle in a central and many mysql like clients), it is a trigger based replication so i think it can be good fit for your needs. Regards, Miguel Angel. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] syncing with a MySQL DB
On Sun, Oct 26, 2008 at 12:41:39PM -0400, Jonah H. Harris wrote: > On Sat, Oct 25, 2008 at 1:19 PM, Ernesto Quiñones <[EMAIL PROTECTED]> wrote: > > I use dbi-link, work fine, but I have problems when I call mysql > > tables "linked" and these tables are big, maybe a millon records, > > the answers is really slow, I need to wait 5 or more minutes to > > have an answer in a single query like this "select * from table > > limit 10", I am thinking maybe dbi-link download all the data to > > pgsql before to give me the answer. > > Yes, that's what Postgres is doing. DBI-link is currently incapable > of pushing down the predicate to the remote system because Postgres > can't give it access to the predicate. More precisely, Postgres is (as yet) incapable of giving DBI-Link the information it needs. > > Anybody knows how improve this? > > If I have to push the predicate down, I'll generally write a > set-returning function which takes some of the predicate, limit, and > offset info to build a dynamic sql query against the remote database > using dblink. That's one way. For others, I can help out on a consulting basis :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] syncing with a MySQL DB
On Sat, Oct 25, 2008 at 1:19 PM, Ernesto Quiñones <[EMAIL PROTECTED]> wrote: > I use dbi-link, work fine, but I have problems when I call mysql > tables "linked" and these tables are big, maybe a millon records, the > answers is really slow, I need to wait 5 or more minutes to have an > answer in a single query like this "select * from table limit 10", I > am thinking maybe dbi-link download all the data to pgsql before to > give me the answer. Yes, that's what Postgres is doing. DBI-link is currently incapable of pushing down the predicate to the remote system because Postgres can't give it access to the predicate. > Anybody knows how improve this? If I have to push the predicate down, I'll generally write a set-returning function which takes some of the predicate, limit, and offset info to build a dynamic sql query against the remote database using dblink. -- Jonah H. Harris, Senior DBA myYearbook.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] syncing with a MySQL DB
I use dbi-link, work fine, but I have problems when I call mysql tables "linked" and these tables are big, maybe a millon records, the answers is really slow, I need to wait 5 or more minutes to have an answer in a single query like this "select * from table limit 10", I am thinking maybe dbi-link download all the data to pgsql before to give me the answer. Anybody knows how improve this? thnaks 2008/10/21 Brandon Metcalf <[EMAIL PROTECTED]>: > m == [EMAIL PROTECTED] writes: > > m> On Tue, Oct 21, 2008 at 9:07 AM, Brandon Metcalf <[EMAIL PROTECTED]> > wrote: > m> > I have a need to keep a PostgreSQL and MySQL table synchronized. My > m> > thoughts are to use triggers on the pgsql side to manipulate the MySQL > m> > table when data in the pgsql table is changed. I also plan on using > m> > PL/Perl to write the functions. > m> > > m> > Are there better ways to achieve this? > > m> have you looked at dbi-link? > > > No, but just did and it looks very cool. Have you used it before? If > so, would you mind if I ask you some questions? We could take it off > the list if that's more appropriate. > > -- > Brandon > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Inscribete en las listas de APESOL http://www.apesol.org/listas.php Visita http://www.eqsoft.net Manuales, noticias, foros, etc. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] syncing with a MySQL DB
On Tue, Oct 21, 2008 at 10:00 AM, Brandon Metcalf <[EMAIL PROTECTED]> wrote: > OK. I'll dig in and can probably figure everything out. I'll contact > David if I can't. You should try http://www.anysql.net/en/software/refresh_mysql.zip It's written in Perl and designed to replicate Oracle->MySQL, but you could easily emulate the Oracle-side by creating triggers in PG to capture the changes. -- Jonah H. Harris, Senior DBA myYearbook.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] syncing with a MySQL DB
m == [EMAIL PROTECTED] writes: m> On Tue, Oct 21, 2008 at 9:54 AM, Brandon Metcalf <[EMAIL PROTECTED]> wrote: m> > m == [EMAIL PROTECTED] writes: m> > m> > m> On Tue, Oct 21, 2008 at 9:07 AM, Brandon Metcalf <[EMAIL PROTECTED]> wrote: m> > m> > I have a need to keep a PostgreSQL and MySQL table synchronized. My m> > m> > thoughts are to use triggers on the pgsql side to manipulate the MySQL m> > m> > table when data in the pgsql table is changed. I also plan on using m> > m> > PL/Perl to write the functions. m> > m> > m> > m> > Are there better ways to achieve this? m> > m> > m> have you looked at dbi-link? m> > m> > m> > No, but just did and it looks very cool. Have you used it before? If m> > so, would you mind if I ask you some questions? We could take it off m> > the list if that's more appropriate. m> i'm not a perl guy...hop on postgresql irc and ping 'davidfetter' :-) OK. I'll dig in and can probably figure everything out. I'll contact David if I can't. Thanks. -- Brandon -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] syncing with a MySQL DB
On Tue, Oct 21, 2008 at 9:54 AM, Brandon Metcalf <[EMAIL PROTECTED]> wrote: > m == [EMAIL PROTECTED] writes: > > m> On Tue, Oct 21, 2008 at 9:07 AM, Brandon Metcalf <[EMAIL PROTECTED]> > wrote: > m> > I have a need to keep a PostgreSQL and MySQL table synchronized. My > m> > thoughts are to use triggers on the pgsql side to manipulate the MySQL > m> > table when data in the pgsql table is changed. I also plan on using > m> > PL/Perl to write the functions. > m> > > m> > Are there better ways to achieve this? > > m> have you looked at dbi-link? > > > No, but just did and it looks very cool. Have you used it before? If > so, would you mind if I ask you some questions? We could take it off > the list if that's more appropriate. i'm not a perl guy...hop on postgresql irc and ping 'davidfetter' :-) merlin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] syncing with a MySQL DB
m == [EMAIL PROTECTED] writes: m> On Tue, Oct 21, 2008 at 9:07 AM, Brandon Metcalf <[EMAIL PROTECTED]> wrote: m> > I have a need to keep a PostgreSQL and MySQL table synchronized. My m> > thoughts are to use triggers on the pgsql side to manipulate the MySQL m> > table when data in the pgsql table is changed. I also plan on using m> > PL/Perl to write the functions. m> > m> > Are there better ways to achieve this? m> have you looked at dbi-link? No, but just did and it looks very cool. Have you used it before? If so, would you mind if I ask you some questions? We could take it off the list if that's more appropriate. -- Brandon -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] syncing with a MySQL DB
On Tue, Oct 21, 2008 at 9:07 AM, Brandon Metcalf <[EMAIL PROTECTED]> wrote: > I have a need to keep a PostgreSQL and MySQL table synchronized. My > thoughts are to use triggers on the pgsql side to manipulate the MySQL > table when data in the pgsql table is changed. I also plan on using > PL/Perl to write the functions. > > Are there better ways to achieve this? have you looked at dbi-link? merlin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general