Forum Moderators: coopster
Would there be any noticed performace improvement if I cache query results in PHP, considering that MySQL is already caching the queries?
Each site and situation is different based on so many factors so a yes/no response here couldn't be justified. It may be your bandwidth as opposed to the HTTP server. Or perhaps it is the database server and queries as opposed to the HTTP server.
Caching may have it's place but so often we don't need to use it when we analyze our site structure and page delivery. If you are delivering a dynamic page from information in a database and the page creation is slow you might want to first optimize your queries. Have you created the appropriate indexes for the larger tables and/or more advanced queries?
I haven't checked if my queries are optimized yet, because MySQL is caching them. So the problem could not be that the queries are slow.
My doubt is actually whether PHP-cahing the queries will be a performace impact considering that the queries are being cached already by MySQL itself.
[edited by: GetFree at 5:55 am (utc) on Dec. 12, 2006]
Then you probably will need to add an index or indexes
to a table column used for example to perform a “where …. Statement”
To alter a table
Type:
ALTER table_name add index (column where a "where" is performed)
Did you by any chance load IE7 on your local machine?
If so check the security setting, the default performs too many checks.
Try to add the URL in the security area friendly sites
That’s another reason to look at it from other machines.