After I have seen that some 3rd party modules duplicate the core_url_rewrite
table to store there additional category rewrite information in it (1), I came to the conclusion that it should be save to remove the joinLeft()
in the flat table classes.
Instead of the joinLeft()
you simply refer to the column main_table.url_path as request_path
in the tables catalog_category_flat_store_[StoreId]
. Please see the new methods.
Downside: To get the correct rewrites in the frontend you need to run the reindex for catalog_category_flat
. During this reindex the correct rewrites will be inserted into the column catalog_category_flat_store_X.url_path
.
Footnotes:
(1) the join with the core_url_rewrite
takes for large product collection really long when you only need the correct rewrite for the categories. This can save per request around ~0.Xsec.