dimension if I...? change an existing compound key from INDEX to UNIQUE on a table that contains over 32 million rows?
Long winded explanation below:
The table is updated from delimited text files using LOAD DATA INFILE. Due to a harware issue, a few files loaded partially, so I have to figure out a way to load the missing records (over 200,000) without creating duplicates of the ones that did load.
There are many ways to do this, but my quickest option is to add the REPLACE keyword to the LOAD DATA INFILE command, to make it overwrite existing records rather than duplicating them, and then reload the files. This only works on tables which contain a unique key, and this one doesn't.
I'm just worried that the simple act of changing the index type on one of the keys will bring about armageddon due to the incredible size of the table.
原帖地址: TechSpott http://www.techspott.com/mysql/8027-will-i-blow-up-my-mysql-server-open-space-time-portal-9th.html#post8922
Any advice is appreciated!
Thanks.
Stephan W: Thanks for the info. I hadn't considered the size of the table in MB. It's only around 6-7 despite the millions of records. In light of that, do you think it's safe to change that key?
Never mind. I just realized this approach won't work. Thanks for the answers though.