Most of you probably know that Magento uses EAV database structure for categories, products. In some cases this solution is not the best or fastest.I will show you here example how to speed up product collection. Magento has config option: "Use Flat Catalog Category" and “Use Flat Catalog Product”.
As we all know, there are so many condition where we need to check whether customer is currently logged in or not for specific functionality. In this blog post you will have idea about how to check if customer is logged in or not in Magento 2.
Magento : SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction
SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction. This issue is called Deadlock issue. Some times it is caused on the database.