-1

I have a table on another server that is formatted with millions of rows like this.

+-------+-----+------+
| Name  | Age | Type |
+-------+-----+------+
| Adam  |  29 | A    |
| Bob   |  18 | B    |
| Carla |  25 | O    |
+-------+-----+------+

I also have three Navicat import profiles that grabs the information from this server and stores it locally in different databases.

SELECT * FROM tble WHERE type = 'A';
SELECT * FROM tble WHERE type = 'B';
SELECT * FROM tble WHERE type = 'O';

Each query takes about 15 minutes to run. What methods are available to me to have each them run and finish with a respectable time? Would I have to worry about lock issues?

1 Answers1

0

"Remember where you left off". That is, have a monotonically increasing column on the table and keep track of how much you grabbed so far. Only grab stuff beyond that. Be sure to have an index on that column.

Rick James
  • 80,479
  • 5
  • 52
  • 119