I was working to a project and we import more than 90k products, suddenly client asked to update SKU format for 21k products.
I search for the solution on internet and find many but duplicate solutions, infact it was a single solution and everyone was copying. When i check this solution i realised that this script is not for me, as it first check the SKU in database and after that update and save, so 21k product means 52k calls to DB ooooooooooooohhhhhhh
Now check my solution.
1. Create CSV with 2 column one for old sku and other for new sku
2. Create a temp table in your magento DB, lets say it’s name is sku_tmp
3. Import your CSV to this table, using your favorit DB tool (phpmyadmin…. i used sqlyog)
4. Now run this query “UPDATE catalog_product_entity AS cpe, sku_temp AS tmp SET cpe.sku = tmp.sku2 WHERE cpe.sku = tmp.sku “
Hurrah…………. 21k rows updated in just seconds……..