Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
3.8.8
-
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.