Server Fault is a question and answer site for system and network administrators. 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

My MySQL server is VERY busy. It has 750k opened tables. I have been reading that I should increase table_cache in line with opened_tables but I have no idea how I am meant to scale it? If I set table_cache to 750k what would happen?

share|improve this question
up vote 1 down vote accepted

I'm thinking you run a lot of queries that generates many temporary tables. From the comments in the doc page on table cache, it appears temporary tables increment the counter by 2 for each one. I don't think scaling the table_cache variable is the issue.

If you're explicitly creating temporary tables, not much that can be done except adjust your code.

Here's some more good information on temporary tables:

share|improve this answer
I don't create any temporary tables myself as in create table blah. What do you mean? – webnoob Jun 12 '11 at 22:09
I recommend reading the second link on how mysql uses temporary tables. – DTest Jun 12 '11 at 23:41

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.