2

I'm trying to transfer 1.5 million of data with blob datatype.

I've tried using insert into statement and manually execute via MySQL Workbench.

I tried to insert it per year, the first year was successfully inserted. (2k+ records), but the 2nd year was not inserted (500k+ records) but no error is shown.

Same script was used except for the year changed.

INSERT ignore INTO TargetTable
(`TransactionId`, `PrimaryPhoto` ,  `Signature`,  `QRImage`)
select   `ID`   , `PrimaryPhoto` ,  `Signature`,  `QRImage`
from SourceTable
where  substr(Transaction,3,4) = '2017';

I also tried execute it with limit 100, and inserted.

What am I missing?

I am still trying to execute this without using where condition, and it not inserted.

What is the problem?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
fLen
  • 468
  • 4
  • 13
  • 25
  • Remove the `IGNORE` keyword to find out if there are [duplicate key violations](https://dev.mysql.com/doc/refman/5.7/en/insert-select.html) in your data. Also, `where substr(Transaction,3,4) = '2017';` can be bad if dates are not equally spaced. – Code4R7 Jun 09 '17 at 07:13
  • meaning, i just insert it as 1.5 million one time, big time? – fLen Jun 09 '17 at 08:10

0 Answers0