I'm currently using the mySQL common schema package along with the split()
function, but I'm struggling to get a working JOIN
query to work?
set @script := "
split({size:2000} :
UPDATE world
SET world.CountryName = (
SELECT country.nicename
FROM country
WHERE country.iso = world.Country
)
)
{
throttle 4;
SELECT $split_total_rowcount AS 'rows updated so far';
}
";
call common_schema.run(@script);
When running this query, it produces the following:
#1644 - QueryScript error: [split() cannot deduce split table name. Please specify explicitly] at 34: "UPDATE world
SET world.Country
As for why I'm trying to split my UPDATE
query into chunks, is because it's trying to update a table that's got 3M+ rows & is struggling when doing the query on it's own