I am working on a reports module and I've noticed that running direct SQL queries is quite faster than using Magento methods for retrieving a collection.
Is there any disadvantage to executing direct SQL queries?
I am working on a reports module and I've noticed that running direct SQL queries is quite faster than using Magento methods for retrieving a collection.
Is there any disadvantage to executing direct SQL queries?
Though it is not good practice, sometimes, you may need to execute direct SQL queries in Magento. However, be careful! The Magento model's are there for a reason and provide a layer of security which you will have to manually add to your own direct SQL queries. Using execute direct SQL queries, its architecture will be messed and be hard to develop any feature. It is better to learn Magento architecture more before developing, though it is tedious job!!