Hi, Developing a new version of our holiday rental site and trying to build a rental browser on our results page (http://instarentals.tgr-media.co.uk/holiday-rentals/). What I have currently done is to load it through AJAX calls which you can see working and there is no issues with this, apart from the fact not robots can pick the links up - as far as I know. The reason I had to do it this way is because I managed to get the search results to load in less than a second, but having the browser means I have to do a COUNT() on each possible category which is taking a lot of time. I've tried numerous different ways to make it so that it can load as the page gets outputted and have put indexes on my tables where applicable. The only other option I can think of now is to create an index table with every possible variation and it's COUNT() stored there, but not sure how to go about doing it. Does any one know how to do this? Or know of a way I can load the counts as the page loads? Query cache only works so far as the table gets updated every day. Using InnoDB table types.
I'm assuming you're referring to the counts at the bottom of the page... Possibly do the counts in a separate process and update a counts table, then just pull that data from a cache. { i.e. The only other option I can think of now is to create an index table with every possible variation and it's COUNT() stored there, but not sure how to go about doing it. } The counts may be a little off at different times during the day, but that's better than doing a count every time.