Check out http://www.landwatch.com/Land_For_Sale

Notice the filters on the left column and how they all have the count of the entries within them. I am sure they are not calculating all these count at the run-time. They have these values stored somewhere and just retrieving the top 5 values. Not sure how this can be done. Any insight?

I hear that datacubes with all these dimensions can give this result instantaneously. But I'd like to think there's an easier solution.



You could just create a separate table for each filter and update them periodically, either using the Event Scheduler, or just by creating an update script and have your OS execute it. (crontab, Windows Task Scheduler).

Personally, I would either create some sort of a master table of filter key/value pairs, or just create a single table for each filter, and then create Stored Procedures that would update them, and then have the Event Scheduler call the procedures every couple of hours.

Then you would just call those values in your front-end, rather then count all of them again and again.

... Might actually try this out when I get the chance. Sounds like fun :-]