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?


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: http://dev.mysql.com/doc/refman/5.5/en/internal-temporary-tables.html

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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