title: Mysql decrease opened files
body: <p>I was wondering if there's a way to decrease the opened files in mysql.</p>
  
  <p>Details :</p>
  
  <ul>
  <li><p>mysql 5.0.92</p></li>
  <li><p>engine used : MyISAM </p></li>
  <li><p>SHOW GLOBAL STATUS LIKE 'Opened_tables' : 150K</p></li>
  <li><p>SHOW VARIABLES LIKE '%open%' : </p>
  
  <pre><code>    open_files_limit    200000
      table_open_cache    40000
  </code></pre></li>
  </ul>
  
  <p>Solutions tried :</p>
  
  <ul>
  <li><p>restart server : it works the opened tables counter is 0 but this isn't a good solution from my pov since you will need a restart every week because the counter will increase fast</p></li>
  <li><p>FLUSH TABLES : like the mysql doc said it should force all tables in use to close but this doesn't happen</p></li>
  </ul>
  
  <p>So any thoughts on this matter?</p>