• My wordpress powered site is running approximately 220 mysql queries for pages which have a lot of products on it. I think its causing the server to crash as it does occasionally. I’m working a lot with custom post types and I’m not sure it this is the problem.

    The site is https://tolotoys.com.

    An example of a page with a lot of queries is https://tolotoys.com/product/

    A lot of the products are pulled in through the wordpress loop but I suspect this is causing the incredible amount of queries? Has anyone else had this problem? What’s the best way to reduce the number of queries?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Perhaps instead of loading all the products at once and then passing through them with javascript to hide them… you could make the arrows do an ajax call to call the next set (as to not force the users to download everything even though they are looking at the first set of items).

    If on each page it is loading up a heck load of information and downloading a heck load of images, it would be slow at both the client and server end.

    Hope this helps?

    let me be more helpful:

    https://tolotoys.com/product/

    displays 7 images all taken from the database.

    Why not do a Mysql call for those 7 products.

    When you click the right hand arrow, do an ajax call for the next 7 products and append them to the product div (leaving the previous ones there so they dont ahve to be reloaded).

    Now instead of 10 people visiting at once returning 220 products each – 2200 products returned). its only returning 70.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘too many mysql queries & crashing of server’ is closed to new replies.