load by Id
$data = Mage::getModel('module_name/model)->load($id);
or
//collection by filter
$data = Mage::getModel('module_name/model)->getCollection()->addFieldToFilter('id',$id);
load by Id
$data = Mage::getModel('module_name/model)->load($id);
or
//collection by filter
$data = Mage::getModel('module_name/model)->getCollection()->addFieldToFilter('id',$id);
The proper method to get single record : Mage::getModel('module_name/model)->load($id);
If you use getCollection() then it will load all the record of that particular table and then it will filter the record from all collection.
While load() will fetch only single record from that table.
->load()
is not called on each object and as such the object is not actually loaded. However, you are correct that loading a single record by ID is the most efficient way.
Commented
Aug 20, 2016 at 6:54