Jump to content

Speeding up Prestashop MySQL Query


Recommended Posts

Everyone knows Prestashop speeds a lot of time doing mysql queries.

 

There are way too many SELECT done by prestashop.

 

Assuming we have done CDN, full page caching, and CCC compile. What else can we do to speed up the site during mysql database queries? How can we reduce the queries? How to better cache them?

 

 

Share this post


Link to post
Share on other sites

Just like Bellini said, it is not trivial, it is going to be hard as hell actually. There is already so much time put into making the queries efficient. Have you ran a sql tuning script on your server?

Share this post


Link to post
Share on other sites

Apologize if my previous statement was kinda rude. Was typing in a hurry.

 

I was actually hoping that someone have identified some codes changes to default prestashop which is universal to all stores that makes a huge impact on the query time and further optimized the default presta.

 

Also, I'm allocated 2 cores for my hosting plan. Would getting more cores vs high frequency cpu help in the mysql queries? I have a lot of SELECT queries for some reasons.

Share this post


Link to post
Share on other sites

Let's say I already have full page cache caching the html page, APC doing the 2 segment 64mb opcode caching and mysql query caching 512mb of queries. What is there actually left for the server to do that is taking that 1-2 sec for html to load on my browser?

Share this post


Link to post
Share on other sites

Ok, maybe they can with that server since they only cost around $50 a month for the whole server. A newer processor would be better, like an e-1230 or something like that. Same number of cores but they run faster and are on a newer die.

Share this post


Link to post
Share on other sites

I think I might as well give up on squeezing that extra bit of juice from the html first page load and focus my efforts on the js part which takes another 1 sec to render page. If right parts of the js is delayed, we can make the page feel faster:

 

http://www.prestashop.com/forums/topic/292821-how-to-forcing-js-to-load-the-last/

 

At least this is more feasible.

Share this post


Link to post
Share on other sites

Total page load time isn't my concern here. It can take up to 30 sec to fully load all DOMs including external ones, but this is meaningless since user wont really get to see this.

 

I'm averaging 2-3 sec (using physical stop watch) page above the fold page render time. ~700ms spent on the initial HTML and another 800-900ms for the theme's js (including download time from maxcdn using testing tools). The rest probably makes up for my reaction delays pressing the stop watch.

 

My target here is to bring initial HTML down to 200ms and theme's js to 200ms.

 

I use Chrome dev tool, pingdom, webpagetest, gtmetrix. Whats more important for me is webpagetest's page render video which gives a better feel of what visitor experience.

 

Seeing how difficult it is to squeeze that extra juice for initial HTML, i might as well look at delaying some js to footer to reduce download time (~100+kb).

Share this post


Link to post
Share on other sites

 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More