Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6935453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:06:18+00:00 2026-05-27T12:06:18+00:00

I have a website, where it loads all data from database and displays it

  • 0

I have a website, where it loads all data from database and displays it in layout.php.

These data are available to whole project, to all page of that project.

Is loading data from database to layout.php a good idea? Does it make the website loading the first page slower?

Is there any alternative to loading data from database to layout.php?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:06:18+00:00Added an answer on May 27, 2026 at 12:06 pm

    1) it’s perfectly fine to load data from the database into the layout. If the user needs the data, it’s no different than if you load it on each action/page.

    2) Yes, it makes the website loading the first page slower (at least until it’s cached). How much slower varies GREATLY upon the amount of data you’re retrieving and the method you’re retrieving it.

    3) If your data is in the database, then no – there’s no alternative than to get it FROM the database. You could look at alternatives for where to store your data, but – with caching, unless you’re talking about a LOT of data, it’s probably not an issue… and if it IS a lot of data, you should probably re-think whether the user really needs that data on all pages.

    Additional note:
    When you say “where it loads all data from database” – that’s quite a red flag. It’s rarely the case where a user needs ALL the data from the database on any page, let alone EVERY page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

currently I have a web which loads excel spreadsheet data into SQL database. When
I have a situation where my website needs to quickly retrieve data from my
I have website, usually all looks fine but sometimes one div is on the
Hy, I was thinking that all my website will have use of cells, using
Basically I hate a satellite website that is including form.php from an entirely different
i have built (locally) a silverlight website. It uses a mysql database (had to
I have been asked to develop a system that collects data from a Sql
I'm managing a website that is built from the ground-up in PHP and uses
I have to send an XML request to recover data from a remote server
I want to have an ASP C# WebSite that loads a simple CSV File

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.