Take the 2-minute tour ×
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. It's 100% free, no registration required.

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 - memcached.org . –  KM. Jan 21 '12 at 3:57
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.