Sunday 20 June 2010 8:53:08 am
After further investigation I came to an interesting point... The SQL queries produced when fetching nodes always have joins on this tables:
- ezcontentobject_tree
- ezcontentobject
- ezcontentclass
- ezcontentobject_name
The problem is that this joins ALWAYS produce a temporary table on the disk, and that's because the tables in the join contain longtext fields (since mysql can't use memory storage for tables containing text fields). Specifically this ones: ezcontentclass - filed "serialized_name_list" ezcontentobject_tree - field "path_identification_string" What happens as a result of this is that a temporary table gets created on disk on EVERY fetch made in eZ (list or tree fetch), no matter how high you set the mysql memory limits. Since doing fetches is the most used way of retrieving data in eZ, this can lead to some serious performance issues. The first questions that comes in mind are:
- Are this two fields really so important so that have to be fetched in this join? How often are this fields actually used and can they be fetched later?
- Can some of this fields be converted to varchar?
This is a problem that eZ Team should deal with, and correct it in some future eZP versions. Here are some suggestions and ideas: 1) Convert the "serialized_name_list" to varchar All the entries in my ezcontentclass table have this field shorter than 100 chars. Why it has to be a longtext field? Also is this field really needed here? Can it's data be divided into some other table fields? 2) Move "path_identification_string" out of ezcontentobject_tree table The first idea is to move this field out from ezcontentobject_tree table, for example in a new table ezcontentobject_tree_path. So that it doesn't get involved in this fetch but is fetched later when needed. Another idea would be to convert path_identification_string to varchar. For example in my DB the longest occurrence of this field is 199. So could this conversion be done? What are the implications? I think this issue deserves some serious consideration from the eZ development team, since it can bring some really big performance gains. So what are your opinions?
--
Nothing is impossible. Not if you can imagine it!
Hubert Farnsworth
|