October 1, 2005 at 1:28 am
hi,
i'm having problems with the speed of the my website. the basic structure is that i have a top.php, bottom.php that are includes in every file in order to display the pics etc. in these two files i have to run a lot of SELECT queries to get a list of users online, banners to display, get a list of names for three different drop down menues. and on top of that every page itself that includes these two files have their own set of select, update and insert queries to run. furthermore i have 2 files connect.php, connec2.php that connect to two different databases. in all my files in include the right connect file before executing a query and i close it after. So what is the best way to optimize this? is there a way to cache some of these queries so they are ran only once per session?
for example if i use "SELECT venueID,name from venue Order By name ASC" this to populate a drop down menu, can i cache it so its not constantly getting executed in every page?
thanks a lot for reading my long message
regards
Soheil
October 3, 2005 at 11:32 am
Have you thought about having a single stored procedure that returns all the data needed for this page? Reducing round trips is usually a decent way of imrpvoing performance. Also, can some of this data be cached?
A.J.
DBA with an attitude
October 4, 2005 at 11:09 am
thank you for your response. Here is the thing, I don't know how to write stored procedures and call them within PHP. also yes some of the queries can be cached. How can i cache them? Does the IIS cache them or do i have to change a setting in the SQL server to cache them?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply