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

Slow query when publishing images.

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • Future
    • 3.8.8
    • Database related
    • None
    • Operating System:
      PHP Version: (please be specific, like '4.4.3' or '5.1.5')
      Database and version: MySQL 5.0
      Browser (and version):

    Description

      When publishing an image with a rather big ezcontentobject_attribute table the following query becomes unbearably slow:

      SELECT id, version FROM   ezcontentobject_attribute WHERE  data_type_string = 'ezimage' and data_text like '%url="var/siteaccess/storage/images/path-to-image.jpg"%'
      

      This query is executed as part of the removal of the oldest version when an object has hit the DefaultVersionHistoryLimit in content.ini.

      Current size of ezcontentobject_attribute:

      mysql> select count(*) from ezcontentobject_attribute;
      +----------+
      | count(*) |
      +----------+
      |  1272091 | 
      +----------+
      
      Steps to reproduce

      1. Publish a new image object.
      2. Re-publish it 5/6 times (or whatever DefaultVersionHistoryLimit is set to).
      3. Upload a new image to the same image object and publish it.
      4. Watch the database cry while executing the slow like query.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: