Code sample # 1
$customer_obj = Mage::getModel('customer/customer');
foreach(){
$customer_data = $customer_obj->load(customer_id);
$customer_data->getFirstname();
$customer_data->getEmail();
........
}
Code sample # 2
$customer_obj = Mage::getModel('customer/customer');
foreach(){
$customer_obj->load(customer_id)->getFirstname();
$customer_obj->load(customer_id)->getEmail();
.........
}
The loop count will be something around 1800-2000 every day.It is one time cron job every day
I am assuming it in this way,
in sample # 1 $customer_data
will have the entire customer details in memory and from there on wards it will fetch it from memory.but in sample # 2 it always hit db with every load
call
Can someone please enlighten me?