shuizhongyueming / flexicontent

Automatically exported from code.google.com/p/flexicontent
0 stars 0 forks source link

performance issue with large #__flexicontent_items_versions table #403

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Just ran into a client with about 130k items in the versions table.

This query took 32(!) seconds:
SELECT c.id,c.version,iv.version AS iversion 
  FROM jos_content AS c  
  LEFT JOIN jos_flexicontent_items_versions AS iv 
  ON c.id=iv.item_id AND c.version=iv.version 
  WHERE sectionid='1' 
  AND c.version > '1' 
  AND iv.version IS NULL 
  LIMIT 0,1;

So pretty please:
alter table jos_flexicontent_items_versions add key idx_versionjoin(item_id, 
version);

Original issue reported on code.google.com by aagaa...@gmail.com on 30 Mar 2012 at 9:08

GoogleCodeExporter commented 9 years ago
This code was redundant and was removed (commented out)

Original comment by ggp...@gmail.com on 3 Apr 2012 at 8:48