Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a very complex search query to write that will touch many tables, have conditions and joins. For efficiency reasons, I am strongly considering creating a "cache table" where I would maybe once a day compute most of the work so that when a user wants to do a search, it would be faster.

However this cache table could easily have 10 to 50 million rows. Is this bad? Is this worth it? Will I gain in efficiency? What are things that I should keep an eye for?

We use InnoDB.

share|improve this question
If it is possible in your case, and you are running a web application, look into using a tool like memcached - . – KM. Jan 21 '12 at 3:57
Perhaps a relational database isn't what you are looking for. – Christopher Schultz Oct 31 '15 at 3:04

If your data can be pre-calculated and is static intra-day then why not?
After all, isn't this what a data warehouse does?

As for having up to 50 million rows, this is peanuts.

share|improve this answer

10-50 million is really not that big. However, the gain really depends on the structure of the table and the queries written against it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.