Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer

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

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
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.