Jump to content

Recommended Posts

Recently i built a template system , to get page requests through the get query string , any case  i use my index.php to initialize all core constants , objects etc... , every request goes through my index page  , i also initialize  1 database object in the index page called db( instance of my own MYSQL abstraction layer) and every other page on my site utilizes this object for database queries.

 

What i would like to know is , will i experience any performance issues due to this ,when the site receives hundreds or thousands of requests?  and lastly should i rather create a new  DB instance on every  page that  would  interact with the database and destroy that instance on each pages?

 

 

Link to comment
https://forums.phpfreaks.com/topic/186924-database-performance/
Share on other sites

by page i mean , that all requests that come to my website go through the index page , like so :

index.php/page/mypage1
index.php/page/mypage2 // and so on

 

the index page then requires the appropriate file into the index page , therefore those other pages never get called directly(similar to MVC), but thanks Mchl , i was thinking the same , was just unsure.

Link to comment
https://forums.phpfreaks.com/topic/186924-database-performance/#findComment-987101
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.