View Single Post
Old Feb 26, 2007, 08:37 PM   #39 (permalink)
Chiefblackhammer
Commander Ham
 
Chiefblackhammer's Avatar
 
Join Date: Nov 2004
Location: Winston Salem, NC
Posts: 1,701
Thanks: 4
Thanked 34 Times in 31 Posts
Chiefblackhammer is making a name for themselvesChiefblackhammer is making a name for themselves
Credits: 26,591
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!
__________________
Status: Offline