MySQL Forums
Forum List  »  Newbie

Use of memory table vs temporary table question
Posted by: Jorge Torralba
Date: January 22, 2011 12:51PM

Don't know where to put this question so I thought I would start in this category.

I have a web app that currently lets a user perform a search then places the search results into a table that another page uses to display the results. Whenever the user goes to the search page again, the results table deletes the previous records for the user based on a session id value stored in the table. I also have a cron job that deletes rows from the table every 5 minutes so that the table only maintains recent search results.

However, I am thinking that when it gets really busy this results table can get quite large considering that some results can be in the thousands.

I thought about using temporary tables but as soon as i go from the search page to the show results page, the temp table is gone as expected.

Would a memory table created withg the session id for the name be a better solution for this approach where I would just drop the memory table Or will it be too much overhead? There could be hundreds if not thousands of these tables created as users search.

or, is my original approach where I delete rows based on time and sessionid a good enough solution? What are your thoughts?

Thanks

Options: ReplyQuote


Subject
Written By
Posted
Use of memory table vs temporary table question
January 22, 2011 12:51PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.