Re: syncing with a MySQL DB

From: David Fetter <david(at)fetter(dot)org>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: Ernesto Quiñones <ernestoq(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: syncing with a MySQL DB
Date: 2008-10-26 18:26:14
Message-ID: 20081026182614.GB30186@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 <ernestoq(at)gmail(dot)com> 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 <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martin Gainty 2008-10-26 22:57:50 Re: Are there plans to add data compression feature to postgresql?
Previous Message Jonah H. Harris 2008-10-26 16:41:39 Re: syncing with a MySQL DB