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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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


1079 Views

Avatar
lx

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

lx