Magento – Datenbanktabelle core_url_rewrite ist sehr groß

Bei einem aktuellen Projekt war die Datenbank Tabelle core_url_rewrite von Magento knapp 2GB groß und damit einfach nur RIESIG! To fix this, haben wir mehrere Dinge getan:

1. Dafür gesorgt, dass die Tabelle zukünftig nicht mehr so groß wird. Hierzu haben wir die Datei Url.php im Verzeichnis app/code/core/Mage/Catalog/Model/ geöffnet und dort ca. bei Zeile 807 den Teil

if ($product->getUrlKey() == '' && !empty($requestPath)
&& strpos($existingRequestPath, $requestPath) === 0
)

in

if (!empty($requestPath)
&& strpos($existingRequestPath, $requestPath) === 0
)

changed. (Achtung bei Updates etc. wird dies wieder überschrieben! Man kann die Datei aber auch in den Ordner app/code/local/Mage/Catalog/Model/ kopieren und dann dort anpassen.)

2. The current core_url_rewrite table emptied as we command

truncate core_url_rewrite;

ausgeführt haben.

3. Die Indexe über das Backend neu aufgebaut haben

4. Die Caches ebenfalls über das Backend (oder FTP) gelöscht haben.

Nun sollte diese Tabelle nicht mehr so groß werden.

Used in Magento Version 1.7.0.2 Comments? Additions? Notes? Gladly!

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

One comment on “Magento – Datenbanktabelle core_url_rewrite ist sehr groß”

Leave a Reply

Your email address will not be published. Required fields are marked *