Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AR's avatar
Level 7

Too many operations on page load?

I am creating a website for a festival which has a lot of shops. shops participating in the festival can create their "page" and showcase their items. There will be no selling/ordering/purchasing/etc they can only list what they have. there is other things such as users, followers, comments, likes, items pics (multiple), price, etc.

Now I am figuring out the database design and I have came to a point were I think there is a lot of operations happening while a shop's page is loading. For example, when I go to "example.com/cupcake_shop", the page will load the shop's info, count the number of views of that page, count the number of followers, count the number of products, get all the contact info from contacts table, get the location, get all the locations that they ship to, get all the info from each product of that page, and all these operations that involves counting and getting info from multiple tables.

Is this a normal thing and I have to have a good server specification or I am missing something?

Please advice

0 likes
6 replies
willvincent's avatar

It's probably fine. But, you didn't provide any code, so it's impossible to give you any real insight on how it might be optimized :)

AR's avatar
Level 7

@willvincent Thanks for reply. I have not started anything yet. I am just designing the database and make sure I know all the steps since this is my first project with Laravel. I just wanted to know if all those operations are fine and are not too much. So based on that it should be fine. Once I finish coding I will post about efficiency if there is a slow page load.

willvincent's avatar

Even pseudo code, or details about the DB schema you're considering would help someone be able to actually answer your initial question. ;)

Snapey's avatar
Snapey
Best Answer
Level 122

If you have a laracasts subscription, check out the series on Redis

Not everything needs to come from database queries.

Please or to participate in this conversation.