1
I have a table MyISAM
with more than 200,000 records.
From time to time I need to do a general update on the content.
I create a new table and import ALL releases to the 'second' table on phpMyAdmin
.
So far so good.
After that I run a script that renames the tables:
$sql = "RENAME TABLE primeira TO outra,segunda TO primeira;";
That’s where the problem is, sometimes it locks everything and you need to restart the MySql
.
I thought I’d use the alter table
, but it seems to me that it is the same thing.
What would be the general upgrade you need to do? Perhaps the best approach is to study your need and look for an alternative. It is not normal to have to update 200,000 records at once
– Sorack
A lot of things, from correcting spelling mistakes to creating new matches, doing this online would take a lot of time. My problem is in the name.
– Roseli
Correct spelling errors you can do using a Trigger with a function for example. What kind of match? You can give an example?
– Sorack
At the level of users, the data is read-only. I add about 200 launches daily. But every 4 months I need to make a general change. Change fields, things like that. Split a color rating into two or three others...
– Roseli
I still think the best way would be to study a way to not need to change so many data at once, but as an alternative you can create a
view
, play to another table the dice, change what you want to change, or play already changing and changes only inview
the name of the reference table– Sorack
Thank you Sorack, I will search. Someone help me with the issue of Name' ?
– Roseli
I edited your question to remove the greetings, as we usually keep them as clean as possible to focus on your scheduling question. If you are interested in visiting a part of the site that is not aimed to ask questions can know the [chat]. If you have questions about the operation, rules and procedures of the site visit the [meta] :)
– Sorack
Has any response helped solve the problem and can address similar questions from other users? If so, make sure to mark the answer as accepted. To do this just click on the left side of it (below the indicator of up and down votes).
– Sorack