Jump to content

370 sql queries for landing page, normal or not?


Recommended Posts



I have enabled the profiling for my shop and I can see that to show my landing page Prestashop is using 370 SQL queries.


I have turned off statistics since with that on it was much more.


I am unhooking modules on a test site just to see what is needing so many queries and so far I have only found that my new product slider seemed to use around 30 queries. The other ones less so even after unhooking a lot I am still at around 330 queries.


Can anyone tell me if this seems normal? Is there anywhere else I should look except for in the modules/positions in the backoffice?


Grateful for any hints on how to reduce the number of sql questions.

Link to comment
Share on other sites

in my opinion yes, it's too high, as far as i remember clean installation has got about 230-240 queries


i asked about non-default theme because i've noticed several times that many theme developers in tpl files use 

{foreach} array with static funtions inside loop, like {category::getproducts}... this is a nightmare ;)

Link to comment
Share on other sites

Hi Guys


Thanks for the quick answers.


Correct, I am using a custom theme. I spent half the night turning off modules to see when the number of queries went down. 


The biggest bandit seemed to be 2 different New Product modules that both used around 40->50 questions. The others did not affect much, just a few queries per module. I think one of the new products modules was the default from Prestashop.


Removing more than I wanted I managed to get to around 270 so still a bit more than the default installation. However if the default install is around 240 then it is not so strange that I have more when using a theme, that was what I was looking for. If the default install needed 100 then it would be more of a problem. The main reason for asking was that I could not see any way to reduce the questions much more since unhooking a lot only saved me around 100 queries.


I am testing this since we have quite long rendering time (shared hosting) and I wanted to see if there is anything simple that can be done to at least improve a bit.


The test site with profiling activated and all modules enabled is actually available here:



I am not asking anyone to spend time on it but if there is something that looks completely insane in the stats overview it would of course help a lot with any feedback. (Please ignore that the product images are not working. I am testing to use a Media Server and for some reason everything works except product images but that is another problem which I still do not understand).


Thanks for all the help

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...