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.

General Questions

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

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

mysql performance problem ?


Reply

621 Views

Avatar
lx

18 March 2012 at 4:17am Community Member, 83 Posts

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".

lx