therealwesfoster Posted July 9, 2009 Share Posted July 9, 2009 What would be the best table type for logs? Thousands are added every day and accessed sometimes as well. What's the best way to store these? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/165413-best-table-type-for-logs/ Share on other sites More sharing options...
corbin Posted July 9, 2009 Share Posted July 9, 2009 If you will be inserting a lot, you will probably want to go with InnoDB. Most of the database engines MySQL uses, including MyISAM, use table level locking, but InnoDB uses row level locking. In other words, for a MyISAM table, if two inserts get fired off simultaneously, the second one must wait until the first one is done before it can even begin. In an InnoDB table, they would happen at the same time. Quote Link to comment https://forums.phpfreaks.com/topic/165413-best-table-type-for-logs/#findComment-872390 Share on other sites More sharing options...
therealwesfoster Posted July 9, 2009 Author Share Posted July 9, 2009 Nice reply Thanks So I wouldn't use "ARCHIVE" or anything like that? Quote Link to comment https://forums.phpfreaks.com/topic/165413-best-table-type-for-logs/#findComment-872392 Share on other sites More sharing options...
corbin Posted July 9, 2009 Share Posted July 9, 2009 Hrmmm... To be honest, I didn't even think to think about the Archive engine.... What do you plan on doing with the data once it's in the tables? Archive tables cannot have indexes.... So, if you planned on searching the tables, that option would go out the window. Quote Link to comment https://forums.phpfreaks.com/topic/165413-best-table-type-for-logs/#findComment-872400 Share on other sites More sharing options...
therealwesfoster Posted July 10, 2009 Author Share Posted July 10, 2009 Ohh, well I would be building an admin cp page for searching the logs. I just want it to be as fast as possible when searching you know? Quote Link to comment https://forums.phpfreaks.com/topic/165413-best-table-type-for-logs/#findComment-872488 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.