vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hi, we all know that memory table has a better performance as the data are stored in memory completely, however, when server was down, the data will be lost. are there any techniques that the original data is stored in MyISAM table or InnoDB, but when server bootup, the data will be write to a memory table automatically so that query can perform against the memory table? something like replication between two tables. thanks... |
| |||
| howachen@gmail.com wrote: > hi, > > we all know that memory table has a better performance as the data are > stored in memory completely, however, when server was down, the data > will be lost. > > are there any techniques that the original data is stored in MyISAM > table or InnoDB, but when server bootup, the data will be write to a > memory table automatically so that query can perform against the memory > table? something like replication between two tables. > > > thanks... > Are you actually having performance problems? Or are you looking for a problems which doesn't exist? I've found that using memory tables are more efficient - but if the server is that loaded you have other problems. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
| |||
| Jerry Stuckle 寫道: > howachen@gmail.com wrote: > > hi, > > > > we all know that memory table has a better performance as the data are > > stored in memory completely, however, when server was down, the data > > will be lost. > > > > are there any techniques that the original data is stored in MyISAM > > table or InnoDB, but when server bootup, the data will be write to a > > memory table automatically so that query can perform against the memory > > table? something like replication between two tables. > > > > > > thanks... > > > > Are you actually having performance problems? Or are you looking for a > problems which doesn't exist? > > I've found that using memory tables are more efficient - but if the > server is that loaded you have other problems. > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstucklex@attglobal.net > ================== i mean using memory table is good, but how to auto. perform the data persistency problem? currently, we need to do the persistency logic in our program e.g. function update() { write_to_myisam_table(); update_the_memory_table(); } function query() { if ( myisam_table_is_not_ready() ) { load_data_from_myisam_into_memory query... } } something like that |
| |||
| howachen@gmail.com wrote: > Jerry Stuckle 寫道: > > >>howachen@gmail.com wrote: >> >>>hi, >>> >>>we all know that memory table has a better performance as the data are >>>stored in memory completely, however, when server was down, the data >>>will be lost. >>> >>>are there any techniques that the original data is stored in MyISAM >>>table or InnoDB, but when server bootup, the data will be write to a >>>memory table automatically so that query can perform against the memory >>>table? something like replication between two tables. >>> >>> >>>thanks... >>> >> >>Are you actually having performance problems? Or are you looking for a >>problems which doesn't exist? >> >>I've found that using memory tables are more efficient - but if the >>server is that loaded you have other problems. >> >>-- >>================== >>Remove the "x" from my email address >>Jerry Stuckle >>JDS Computer Training Corp. >>jstucklex@attglobal.net >>================== > > > i mean using memory table is good, but how to auto. perform the data > persistency problem? > currently, we need to do the persistency logic in our program > > e.g. > > function update() { > > write_to_myisam_table(); > update_the_memory_table(); > } > > function query() { > > if ( myisam_table_is_not_ready() ) { > load_data_from_myisam_into_memory > query... > } > } > > > something like that > I repeat. Are you actually having a problem, or are you looking for a problem which doesn't exist? Memory tables can be good. They can also be bad. It depends on the situation. And they aren't a cure-all to everything. And they are seldom a cure to anything. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
| ||||
| howachen@gmail.com wrote: > we all know that memory table has a better performance as the data are > stored in memory completely This is not generally true. HEAP tables eat a lot of memory. Sometimes the overall performance of the MySQL server maybe better if you use your memory more conservative to cache indexes only. You can easily shoot yourself in the foot with a growing HEAP table (eating all your memory, causing the system to thrash). > are there any techniques that the original data is stored in MyISAM > table or InnoDB, but when server bootup, the data will be write to a > memory table automatically so that query can perform against the memory > table? This is about the 5th question from you, that is answered at length in the manual. Did you ever have a look into it? You can do arbitrary initializations at server startup time using the --init-file option for mysqld (i.e. in my.cnf). This is mentioned in the chapter on HEAP tables as well. http://dev.mysql.com/doc/refman/5.0/...ge-engine.html http://dev.mysql.com/doc/refman/5.0/...r-options.html XL -- Axel Schwenke, Senior Software Developer, MySQL AB Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/ MySQL User Forums: http://forums.mysql.com/ |