No duplicate records, ignore
I am trying to do a bulk insert with 20 records at a time. Mysql, linux deb 8, php, python. Table Structure: id(uniq,ai),dt(datetime),temp(float),pres(float) - id is not inserted. I want to ignore records where dt and temp are unique (but not unique keys).
For instance, update 1 with no duplicates = 20 new records. Update 2 is only 25% new. 5 records have dropped off and 5 records are new. When the bulk insert runs again, only the last 5 records are inserted because their dt and temp colums did not not have duplicates and the 15 duplicates are ignored.
I've tried different variations of INSERT IGNORE, REPLACE INTO, and ON DUPLICATE KEY UPDATE
Any help is appreciated.
- miner