I have created a new category on my store after creating this website taking 15-20 seconds to load, but before that it's taking only 5-6 seconds
Hello,
Make sure reindex is not invalid and check enabled or not.
If the help you then mark as solution.
Hi @shyopatsaraswat,
You could enable the Magento's profiler (this guide will help you https://docs.nexcess.net/article/how-to-enable-the-magento-profiler.html )
Or you can use this one https://github.com/AOEpeople/Aoe_Profiler too. This is a great tool to find bottlenecks.
i have reindex all, there is no error, issue still exist.
Hi Damian,
I installed AOE profiler and get a query which causing slow website
SELECT `main_table`.`entity_id`, main_table.`name`, main_table.`path`, `main_table`.`is_active`, `main_table`.`is_anchor`, `main_table`.`url_path` AS `request_path`, `url_rewrite`.`request_path` FROM `catalog_category_flat_store_1` AS `main_table` LEFT JOIN `core_url_rewrite` AS `url_rewrite` ON url_rewrite.category_id=main_table.entity_id AND url_rewrite.is_system=1 AND url_rewrite.store_id = 1 AND url_rewrite.id_path LIKE 'category/%' WHERE (main_table.is_active = '1') AND (main_table.include_in_menu = '1') AND (main_table.is_active = '1') AND (main_table.path like '1/2/%') ORDER BY `main_table`.`position` ASC
but when i remove newly created category it's goes back to normal as previous state like loading in 5-6 sec.
Hi @shyopatsaraswat,
That time is not right.
What if you execute that query into the mysql server just to see if the bottleneck is the database or the code?
Hello @shyopatsaraswat,
The category move is an expensive event.
It triggers the reindexing of URL rewrites and category product association (and maybe others).
You should put the indexes on manual instead of on save, move your categories around and reindex everything when you are done.
I'm not sure that truncating core_url_rewrite table will solve your problem.
It may solve it for your first category move, but you will end up with a lot of rewrites again.
--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"
I have the same problem here. The sam equery and slow down in performance drastically. Can't find the solution for a week now,
Hello @bojan_oremuz,
Please check my above message, I also get same issue.
--
If my answer is useful, please Accept as Solution & give Kudos