Changeset 56

Show
Ignore:
Timestamp:
04/05/07 05:08:33 (1 year ago)
Author:
simon
Message:

JOIN optimization.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Memories/SystemTag.pm

    r2 r56  
    77Memories::Photo->set_sql(sorted_by_system_tag => q/ 
    88SELECT photo.id as id, title, uploader, uploaded, x, y 
    9 FROM photo, system_tag, system_tagging 
     9FROM photo, system_tagging 
    1010WHERE system_tagging.photo = photo.id 
    11     AND system_tagging.tag = system_tag.id 
    12     AND system_tag.id = ? 
     11    AND system_tagging.tag = ? 
    1312ORDER BY photo.uploaded DESC 
    1413/ 
  • trunk/Memories/Tag.pm

    r47 r56  
    66Memories::Photo->set_sql(sorted_by_tag => q/ 
    77SELECT photo.id as id, title, uploader, uploaded, x, y 
    8 FROM photo, tag, tagging 
     8FROM photo, tagging 
    99WHERE tagging.photo = photo.id 
    10     AND tagging.tag = tag.id 
    11     AND tag.id = ? 
     10    AND tagging.tag = ? 
    1211ORDER BY photo.uploaded DESC 
    1312/