Mfred Posted January 25, 2007 Share Posted January 25, 2007 Hi, we have here a huge problem on the index.php site and the page parse them of this site. 25/01/2007 13:02:58 - /shop/index.php (4.545s) Also we have a testinstallation with a 1:1 copy of the liveshop and there the parsetimes are ok: 25/01/2007 13:02:21 - /testshop/index.php (0.933s) Interesting also that it only appears on the index.php site. All other pages load quite fast. Any hints on this problem? br, mfred Link to comment Share on other sites More sharing options...
roman3x Posted January 25, 2007 Share Posted January 25, 2007 25/01/2007 13:02:58 - /shop/index.php (4.545s)25/01/2007 13:02:21 - /testshop/index.php (0.933s) Interesting also that it only appears on the index.php site. Maybe .htaccess in home directory? Really 1:1 copy? Link to comment Share on other sites More sharing options...
Mfred Posted January 28, 2007 Author Share Posted January 28, 2007 In the meantime I found out its due to the featured products contribution the main sql query is taking 2.5 - 2.9 seconds: SELECT p.products_id, p.products_image, p.products_tax_class_id, s.status AS specstat, s.specials_new_products_price, p.products_price FROM products p LEFT JOIN specials s ON p.products_id = s.products_id LEFT JOIN featured f ON p.products_id = f.products_id WHERE p.products_status = '1' AND f.status = '1' ORDER BY rand( 1699398240 ) DESC LIMIT 12 The question is now how to speed up this query? Link to comment Share on other sites More sharing options...
roman3x Posted January 30, 2007 Share Posted January 30, 2007 - try add index on column products_id in table specials. - about table featured i don't know nothing, but maybe need also index on column products_id Link to comment Share on other sites More sharing options...
Mfred Posted February 2, 2007 Author Share Posted February 2, 2007 - try add index on column products_id in table specials.- about table featured i don't know nothing, but maybe need also index on column products_id I tried it now in a test environment and indexing really speeds up the thing. The only point I didnt already do it in production environment is a Warning I get in phpmyadmin: "Die Index-Typen INDEX und PRIMARY sollten nicht gleichzeitig für die Spalte `products_id` gesetzt sein" like: The Index Types INDEX and PRIMARY should not be set at the same time for columt products_id Can I ignore it or worry about ? thx mfred Link to comment Share on other sites More sharing options...
roman3x Posted February 3, 2007 Share Posted February 3, 2007 You have 2 tables - specials,featured. First table was without index. If Y trieing add index on indexed column in second table... i don't know nothing about second table. Your informations are deficiently for me. But probably now all is OK, if speed is good. ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.