I just want to remove all products from given category,
for that I have tried below code which works absolutely fine , But it takes to much time ,
So I just want some code which works faster than this
$category = Mage::getModel('catalog/category')->load($categoryId);
$productCollection = $category->getProductCollection();
foreach($productCollection as $product){
Mage::getSingleton('catalog/category_api')
->removeProduct($categoryId,$product->getId());
}
Mage::getSingleton('catalog/category_api') ->removeProduct($categoryId,$productId);