Jump to content

Database performance


knetcozd

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.