I have a lot of RAM (1 gb) on my server, and I have a table (100 mb) that I would like to increase the speed of. Is it possible to keep the entire table in memory (while keeping it MYISAM)? Would this make things faster (I already have the proper indexes).
Thanks
Each MyISAM table is stored on disk in two files. The files have names that begin with the table name and have an extension to indicate the file type. The data file has an . MYD ( MYData ) extension.
If you use InnoDB, MySQL will automatically cache the table for you, and create hash-indexes for often used parts of the index. I suggest you increase the amount of memory MySQL has at its disposal and it should take care of your problems all by itself. By default MySQL is setup to conserve space, not to run fast.
1, “How MySQL Uses Indexes”. MEMORY tables can have up to 64 indexes per table, 16 columns per index and a maximum key length of 3072 bytes.
In terms of data queries (SELECT), InnoDB is the clear winner, but when it comes to database writes (INSERT and UPDATE), MyISAM is somewhat faster. However, the lower speed of InnoDB is more than compensated for by its transaction protocol.
A better suggestion will be increase query cache size, let mysql do the internal optimization
more details - http://dev.mysql.com/doc/refman/5.5/en/query-cache.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With