Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16736

Improved Speed for monolingual Systems

    XMLWordPrintable

Details

    Description

      It looks like, if you drop the language mask from where that you gain speed for the execution. This needs to be evaluated and implemented in future versions.

      Original Query

      SELECT DISTINCT
                             ezcontentobject.*,
                             ezcontentobject_tree.*,
                             ezcontentclass.serialized_name_list as class_serialized_name_list,
                             ezcontentclass.identifier as class_identifier,
                             ezcontentclass.is_container as is_container
                             
                             , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
                             
                             
                         FROM
                            ezcontentobject_tree,
                            ezcontentobject,ezcontentclass
                            , ezcontentobject_name 
                            
                            
                            
                            
                         WHERE
                             ezcontentobject_tree.path_string like '/1/2/%' and  
                            
                            
                            
                            ezcontentclass.version=0 AND
                            ezcontentobject_tree.node_id != 2 AND
                            ezcontentobject_tree.contentobject_id = ezcontentobject.id  AND
                            ezcontentclass.id = ezcontentobject.contentclass_id AND
                            
                               ezcontentobject.contentclass_id  IN  ( 1, 23, 37 ) AND
                             ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                                         ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and 
       ( ezcontentobject_name.language_id & ezcontentobject.language_mask > 0 AND
           ( (   ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 1 )
         + ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 2 ) )
         <
           ( ezcontentobject_name.language_id & 1 )
         + ( ( ezcontentobject_name.language_id & 2 ) )
       ) 
      
                            AND ezcontentobject_tree.is_invisible = 0
                            
      
                             AND
       ezcontentobject.language_mask & 3 > 0 
      
                       ORDER BY depth ASC, ezcontentobject_name.name ASC
      LIMIT 551, 1
      

      Optimized query

      SELECT DISTINCT
                             ezcontentobject.*,
                             ezcontentobject_tree.*,
                             ezcontentclass.serialized_name_list as class_serialized_name_list,
                             ezcontentclass.identifier as class_identifier,
                             ezcontentclass.is_container as is_container
                             
                             , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
      
                             
                         FROM
                            ezcontentobject_tree,
                            ezcontentobject,ezcontentclass
                            , ezcontentobject_name 
                            
                            
                            
                            
                         WHERE
                             ezcontentobject_tree.path_string like '/1/2/%' and  
      
                            
                            
                            ezcontentclass.version=0 AND
                            ezcontentobject_tree.node_id != 2 AND
                            ezcontentobject_tree.contentobject_id = ezcontentobject.id  AND
                            ezcontentclass.id = ezcontentobject.contentclass_id AND
                            
                               ezcontentobject.contentclass_id  IN  ( 1, 23, 37 ) AND
                             ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                                         ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version
      
      
                            AND ezcontentobject_tree.is_invisible = 0
      
      
      
                       ORDER BY depth ASC, ezcontentobject_name.name ASC
      LIMIT 551, 1
      

      Attachments

        Activity

          People

            unknown unknown
            jkn jkn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: