I'm updating a table with million records with a simple query but its taking huge timimg, wondering if someone could bring some magic with alternative to speed the process query bellow
UPDATE sources.product
SET partial=left(full,7);
I'm updating a table with million records with a simple query but its taking huge timimg, wondering if someone could bring some magic with alternative to speed the process query bellow
UPDATE sources.product
SET partial=left(full,7);
You need to narrow the number of rows to make it go faster. Try a few things:
Reduce the number of indexes on the partial
column. Each index requires an update when you change partial
so one update may cause 2 or 3 other updates.
Timestamp your rows so you only update new ones.
Create a trigger to update partial
when a row is inserted or updated.
indexing is necessary for a table if it contains big data, i think you should try re-indexing and then try using this command.