Re:"I've isolated the bug to a database query"
by ceejayoz on Wednesday November 09, 2011 @11:09AM
(#3216025)
MySQL's default may be MyISAM, but it's a bad default. It is a good thing that Rails uses InnoDB by default.
Re:"I've isolated the bug to a database query"
by ngsayjoe on Wednesday November 09, 2011 @12:41PM
(#3216464)
I think MySQL 5.5 onwards the default would be InnoDB.
Re:"I've isolated the bug to a database query"
by jswinghammer on Wednesday November 09, 2011 @11:03AM
(#3215992)
This is changing because MyISAM is not really a true database (in the ACID compliant sense of the term). I guess I would have assumed they were MyISAM too but they don't perform differently enough at low usage levels that you would notice it right? How big was this was application?
Re:"I've isolated the bug to a database query"
by ngsayjoe on Wednesday November 09, 2011 @12:40PM
(#3216457)
About 5 million pageviews / month. The website is quite processing intensive.
Re:"I've isolated the bug to a database query"
by ceejayoz on Wednesday November 09, 2011 @03:03PM
(#3217141)
That's only two pageviews a second, on average.
Re:"I've isolated the bug to a database query"
by jswinghammer on Wednesday November 09, 2011 @03:58PM
(#3217366)
We can agree that traffic rarely comes in at an average rate.
Re:"I've isolated the bug to a database query"
by moe on Wednesday November 09, 2011 @05:15PM
(#3217726)
Assuming the standard bell curve it's six pageviews a second, at peak.
Re:"I've isolated the bug to a database query"
by ceejayoz on Wednesday November 09, 2011 @05:55PM
(#3217919)
And that's apparently spread across four read-only slaves, too. I'm more inclined to blame the code than the database in this case.
Re:"I've isolated the bug to a database query"
by ngsayjoe on Thursday November 10, 2011 @12:44AM
(#3219092)
No, it is not the code. It is InnoDB's default buffer pool set to 8MB that cause my website to be so slow ...
Re:"I've isolated the bug to a database query"
by wolf550e on Wednesday November 09, 2011 @12:36PM
(#3216445)
Dumping the schema from the database itself will reveal the table type. Knowing the physical organization of the schema is required for optimization work. If you only used the logical organization information (UML diagram for example) you were doing it wrong.
In real RDBMS systems, tables can be clustered (index organized in Oracle-speak) or not, nested or not, in different tablespaces, with many different parameters that do not change the semantic of DML/queries but change the performance significantly.
This parameter saved it all "innodb_buffer_pool_size = 768M" ... how am I supposed to know that Rails creates InnoDB by default, i thought MySQL default was always MyISAM.