I inherited a system in which all updates (even to a single row/record) to MySQL tables are not done using
UPDATE table_name SET. Rather, they are done by:
- Exporting the existing table to a CSV (text) file.
- Modifying the corresponding row(s) in the CSV file.
- Reloading the CSV file using
LOAD DATA ... REPLACE INTO TABLE.
This is the first time I see such an approach to updating table records and I am wondering what could be the rational for that.
BTW, this scheme results in numerous thread synchronization issues because of the need to lock CSV files while updating.
I would appreciate an explanation or insights on the benefits of using
LOAD DATA ... REPLACE INTO TABLE instead of
UPDATE table_name SET.