0

I am trying to find how I can resolve a magento issue, from what I can see when Im listing a bundle product in magento, I click 'bundle items' which does an ajax post and retrieves the data. The actual request to mysql requests all the simple product id's, because we have in excess of 15,000 simple products, this load time is around 37 seconds.

Im looking for suggestions to lead me in the right direction, to remove the query and be lead to a different method.

2 Answers 2

1

The first step is profiling.

  • Install and configure Aoe_Profiler
  • Log the SQL Queries that are executed (lib/Varien/Db/Adapter/Pdo/Mysql.php: $_logAllQueries, $debug, and so on)

This should provide you a high level overview, you can also do a more in-depth profiling with xdebug and webgrind

This should point you to the part of the code that takes a long time. By the looks of it, maybe the full product collection in loaded then something else happens.

Another thing, that shouldn't be ignored is the hardware. Where are you running this? If it's a vagrant machine with really low resources allocated, this would not be a surprise.

2
  • Hi Florinel, Thanks for the info, the server is 8GB on its own, I do think 15000 records in 37 seconds is quite fast, but as i am no DBA I cant refer to how fast it should/could be. Also to note, I got the query log, thats how I knew it was searching for the 15,000 ID's. Commented Oct 10, 2013 at 11:24
  • Thanks for the Direction, Aoe Profiler im going to get added, it looks brilliant, a long with New Relic I might be able to narrow down other bottlenecks on the system. Commented Oct 13, 2013 at 16:12
0

Of course, you cannot ask Magento to perform that kind of thing on inadequate hosting, which is what it normally comes down to.

Is there a particular reason you posted the question multiple times even though the answer was already given, hosting (and a distant second a clean install or trying to switch off all extensions). We guess you are on shared hosting, it is logical that it performs a retrieval of all products for association in admin. You cannot expect people to use their time looking at something that is standard Magento, caused by your overusing the system without providing it the resources to run, and the fact that you don't like the answer given even though it is the correct one. It is unreasonable.

https://stackoverflow.com/questions/18787073/magento-bundle-products-long-server-request

Magento Bundles (Long MYSQL Query)

Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein

3
  • Hi Serpyre thanks for your inpolite response, If you also read through the question you will have noticed I have also done a clean install replicated the database which concludes it is the actual structure within magento, hence me asking the above question on suggestions. Commented Oct 10, 2013 at 11:27
  • Clean install then replicated the database, so yes magento's structure is exactly the same, the database is not, I am confirming the load time issue is with magento's code in requesting all simple product id's (in the bundle). Whichever way you look at it hardware or not, magento's bundle code runs the query. This is where the bottleneck is. I can confirm the structure of server can be better suited. However isnt needed at the moment. So back to my original question. Im looking for suggestions to lead me in the right direction, to remove the query and be lead to a different method. Commented Oct 13, 2013 at 16:07
  • I think one of tests I will do is put up an identical server withour magento (Just the database) move the LIVE database to it, run the query and see if its sped up, then I'll know its apache and mysql spreading resources, from there I will look at optimising the database seperately apply some load balancers and web servers and look at results. Commented Oct 23, 2013 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.