Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is myisam table type really better for a log table (mysql)?

i've been reading up whether to use myisam or innodb for a log table (lots of writes, very few reads). While some people say that myisam is overall faster and less resource-intensive, other people say that myisam would actually be the worse choice because it only has table-level locking.

Does anybody have actual experience with this situation and care to share their recommendation ?

thanks in advance

like image 815
Sherif Buzz Avatar asked Dec 01 '25 17:12

Sherif Buzz


1 Answers

MyISAM is good if you are either doing mostly writes with just a few queries, or mostly queries with just a few writes.

My guess is that for a log you would probably be doing only a few queries so MyISAM may be the best choice for you, but if the log is being frequently displayed and filtered in your application then you should use InnoDB.

like image 66
3urdoch Avatar answered Dec 04 '25 04:12

3urdoch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!