mysql - What is a good way to erase the entire data and load the new data in a service table? -
i new in mysql.
i receive full metadata every day.
however, not know data added, deleted , updated.
i use mysql , size of data 1 million.
what way erase entire data , load new data in service table?
i think following methods.
first option,
run delete , insert in transaction.
second option,
rename table foo foo_old, foo_new foo
please advise me how deal it.
you can truncate table , import new data afterwards. dont need rename anything.
query truncate: truncate table {tablename}; cli import: mysql -u {username} -p {database} < {importfile.sql}
Comments
Post a Comment