in detail, here is what I am doing and trying to improve upon.
A user searches a database of photos based on different search criteria. Sometimes his or her search could have 10 matches or 10000. This is not really an issue at this point in the user interaction. Since the resulting set of rows are not cached and are presented with pages of thumbnails. Each time the user moves to another page, another query is executed with a new off set and page limit. So in reality, the number of rows returned are minimal at 12.
The complexity and need for caching the entire results into a separate table is needed so that if a user clicks on a thumbnail from the original results as described above the user is then presented with the full view of the photograph. I then use the cached table with the thousands of rows in it to determine which is the next or previous photo with the same criteria based on original search. In other words, allow the user to browse all the photos that match the result set.
Here is the sites search page
http://nikonimages.com/showgallery.php?showall=1
By the way, the results table only has a sessionid, timestamp and photoid column. The user browses for photos based on the sessionid. The cron job deletes entries with timestamps older than 5 minutes.