Home » Performance » MySQL » FLUSH_TABLE Statement
FLUSH_TABLE Statement [message #3501] Thu, 04 September 2008 04:49 Go to next message
sterma  is currently offline sterma
Messages: 8
Registered: September 2008
Junior Member
hi guys,

does it make sense to flush all open tables in scheduled times? (maybe crontab)

the reason:
our database got much statements from our CMS portal every 10min. the open_tables value (512) inreases very fast in a few days finally until to the limit. so mysql starting to use tmp. tables.

I understand the mysql "open_table_cache" as follows:
mysql try to hold tables which are opened by any statement in the cache to save time by reopen it, right? so tehe open_table value normally is increasing an mysql keep the tables in cache for lifetime or until reboot..

but maybe this isnt“n nessecary. for an application (intranet) and CMS (database-syncs) which are sending a lot queries on different tables with differnt users, the table cache will reach the limit very fast. so what is better, to increase the open table limit or sending a flush table ever week?

thanks for every idea!!!

i hope you understand my english - its not the best Confused

greetz markus

Re: FLUSH_TABLE Statement [message #3534 is a reply to message #3501 ] Tue, 16 September 2008 03:25 Go to previous messageGo to next message
sterma  is currently offline sterma
Messages: 8
Registered: September 2008
Junior Member
well, no answer yet Confused

do I mispresent something? should I give more information?

thanks,

markus
Re: FLUSH_TABLE Statement [message #3583 is a reply to message #3501 ] Sun, 28 September 2008 17:02 Go to previous messageGo to next message
artur8ur  is currently offline artur8ur
Messages: 23
Registered: September 2008
Junior Member
Hi,

Quote:

our database got much statements from our CMS portal every 10min. the open_tables value (512) inreases very fast in a few days finally until to the limit. so mysql starting to use tmp. tables.


This has nothing to do with the table cache.
The Cache is used to "cache" the open Filehandler and some metainformations about the open table-file. So the same table-file has not to be reopend, for each query which uses this table.
You can find more informations in the doc under: "7.4.8. How MySQL Opens and Closes Tables"

tmp Tables are used to store intermediate data, while processing a query. So each query might use a tmp(disk) table, to calculate the result. Longer runtime -> more queries -> more tmp tables.
But this has nothing todo with the table cache.
"7.5.9. How MySQL Uses Internal Temporary Tables"


To answer your question: No, there should be no reason to flush the open tables periodicity.
Re: FLUSH_TABLE Statement [message #3596 is a reply to message #3583 ] Wed, 01 October 2008 05:49 Go to previous message
sterma  is currently offline sterma
Messages: 8
Registered: September 2008
Junior Member
hi artur8ur,

thanks for your reply. thinks are clear now =)

Previous Topic:MySQL Server Really High Load Question
Next Topic:MySQL: Replacing the first 0 with 44
Goto Forum:
  


Current Time: Fri Jul 10 06:13:18 EDT 2009

Total time taken to generate the page: 0.02117 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.