Question

I'm having a big problem with MAGMI (well at least I think so), the thing is, I have two stores with the same products (about 32000 products in each one), in one store I've used MAGMI to import the products, but this store has became VERY slow (huge time to first byte) after the import, both stores are in the same host.

I asked my host manager about this problem and he told me that the index.php of the magmi imported store is querying the hole link structure of the website in the MySQL several times. Here's his response:

The problem is with MySQL. The issue is the query

SELECT main_table.entity_id,

 main_table.`name`, main_table.`path`, `main_table`.`is_active`,

 `main_table`.`is_anchor`, `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.product_id IS NULL 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.path like '1/2/%') ORDER BY

 `main_table`.`position` ASC

Pulls over 20 thousand rows of information.

If you would like I can send along an example of the information it pulls. In short, the home page is pulling the entire link structure which is over 20 thousand rows.

What might be the problem?

Was it helpful?

Solution

This is surely due to your category layout (maybe autocreate via magmi categories plugin).

This is not "magmi" that has this resource consuming behaviour but Magento.

I suspect you have several thousands of categories to have such a slow behaviour.

I would have advised to read this article i wrote some time ago, to understand the problem.

One way to get around this would be to use full page caching to avoid magento to query the database too often, but it's only a workaround.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top