2

Initially I thought this would be a stupid question, but now I am inspired by the following question.

Background: I have a lot of data in MySQL, but MySQL's spatial support is terrible. Ideally I would like to migrate everything to Postgres, but converting from MySQL to Postgres is a massive ball of hurt (I've already wasted close to a week struggling with it). Now I am thinking, if only I could maintain only the spatial portion in Pg, do the spatial queries in Pg, then use those row ids to query non-spatial data from MySQL.

I am a Perl DBI person. My question is thus -- can I create a single database handle that actually allows querying by JOINing a table from Pg with a table from MySQL, assuming they have a common id column?

Community
  • 1
  • 1
punkish
  • 13,598
  • 26
  • 66
  • 101

2 Answers2

2

No, you will need to query both separately and combine the data at the application layer. See a more informed answer here:

How to create linked server MySQL

Community
  • 1
  • 1
jmacinnes
  • 1,589
  • 1
  • 11
  • 21
1

No, I don't think you could do it that way. You would have to query the data separately and combine the results in your code. I believe there are no REAL RDB's that can do what you want.

xpda
  • 15,585
  • 8
  • 51
  • 82
Mingliang
  • 69
  • 1
  • 6