Fast #magento reindex after product import with magmi

Importing products with magmi, a full reindex is needed to show the on the frontend. Even if Magmi has an on-fly reindexer, it seems to me not working properly, as I still not able to see products.

To avoid full reindexing that take ages on a big catalog, I simply disabled and the enabled latest products using the mass action functionality in the backend. After that, finally product are visible.

To reindex product attributes, as the filtered navigation doesn’t work anymore, I removed then added again products from a store view

Get configurable product attributes and products children #Magento

load configurable product
$product = Mage::getModel('catalog/product')->load($productId);

get simple produts’ ids
$childIds = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product->getId());

get simple products
$childProducts = Mage::getModel('catalog/product_type_configurable')

get configurable options
$productAttributeOptions = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
$attributeOptions = array();
foreach ($productAttributeOptions as $productAttribute) {
foreach ($productAttribute['values'] as $attribute) {
$attributeOptions[$productAttribute['label']][$attribute['value_index']] = $attribute['store_label'];