| Re: Top Posters of the Months stats Man...if that is a complex query that taxes the site then the database design must really suck (Hammer writes queries all day in Oracle....13,000 tables...millions of records...). Neither here nor there why not just have it on a timed execution via a php function which only runs once a day. Load the database results into global variables and display them. That way no performance issues and you still get what you want...just won't be able to update it by us users...which I don't see as a problem.
Option 2 is to create a view in your database based off of the complex queries (only have to do that once) and have the query based off of that view...a view is dynamic and will refresh (in the database) every time it is accessed...that way your query is very simple and not taxing on the site!
Just my thoughts! |