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

ezcontentobject - mysql query

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.0.4, 4.1.0beta1
    • 3.10.0, 3.9.4, 4.0.0alpha2
    • Database related
    • None

    Description

      When you delete an object some query are not optimize.

      file kernel\classes\ezcontentobject.php
      Line 1613 (ez3.9.2)

       $db->query( "DELETE FROM ezcontentobject_link
                   WHERE from_contentobject_id = '$delID' OR to_contentobject_id = '$delID'" );
      

      mut be replace by

       $db->query( "DELETE FROM ezcontentobject_link
                   WHERE from_contentobject_id = '$delID'" );
      
       $db->query( "DELETE FROM ezcontentobject_link  
                   WHERE to_contentobject_id = '$delID'" );
      
      

      IF you have a lot of rows in the table (600.000)
      the first query take 1s
      the new one take 0.0004

      Attachments

        Activity

          People

            andre1 andre1
            kouz28 kouz28
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: