With a large number of goods, OpenCart dies, ceases to display the interface altogether. It turned out that one of the slowest queries (but frequent) is
SELECT COUNT(DISTINCT p.product_id) AS total FROM oc_category_path cp LEFT JOIN oc_product_to_category p2c ON (cp.category_id = p2c.category_id) LEFT JOIN oc_product p ON (p2c.product_id = p.product_id) LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = '1' AND p.status = '1' AND p.date_available <= '2015-05-21 12:58:00' AND p2s.store_id = '0' AND cp.path_id = '823'; EXPLAIN on it shows indexes of different sizes (key_len), although in all tables identifiers of type int (11). Why is this happening and how to treat it? If sclerosis does not change me, in terms of performance, this discrepancy is bad for me.

(source: catalogloader.com )