Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

mysql performance problem ?

Go to End



Community Member, 83 Posts

18 March 2012 at 4:17am

in our latest SS project we having some performance problems with the mysql db server.
So now i need to find the bottleneck in the database server.
The configuration of the mysql server is not optimal, but i think i found a problem that comes from SS.
I am no mysql expert, so please let me know if i am wrong.

When you define something like :

static $db = array(..., 'Description' => 'Text', 'Comments' => 'HTMLText');

the columns for 'Descrition' and 'Comments' are created as 'mediumtext'
This is the default behaviour
If you are making queries that uses this table, i think mysql will slow down because of the mediumtext colums.
The reason is (i think) msql is using temporary tables internal. If tinytext/mediumtext/blob colums exists, mysql cannot create the tmp tables in memory but needs to create them on a harddisk.
Temporary tables on harddisk are of course slower than creating them in memory.

The mysql status will show you then a high value for "Created_tmp_disk_tables"

Can i relpace any mediumtext column with Varchar(1000) ?

Has anyone ever done some mysql performance testing concerning this "problem".