0

I have a remote database table that I need to pull the data from. Because I have no control over the remote database, other than read access, I can't update indices to make the queries faster.

mysqldump is not an option.

Methods I've tried so far:

  • Pagination (using limit and offset); basically operating like a cursor

Issues that I'm running into:

  • High CPU load on the database due to being unable to set new indices
  • Seems to be unreliable due to long query times (20+ seconds per query)

Any advice would he greatly appreciate. Thank you!

john
  • 33,520
  • 12
  • 45
  • 62

2 Answers2

0

If you are thinking about dumping the data out like a cache/backup, then you can follow up on @hiropon's answer.

On the other hand, if the purpose of the query is so that the data you dumped can interact with your other tables on your server (eg: inner join), then you may consider using federated table.

Willy_Sunny
  • 199
  • 3
  • 14
0

hiropon posted a viable solution which is a php port of mysqldump:

Backup database(s) using query without using mysqldump

john
  • 33,520
  • 12
  • 45
  • 62