Fossil

Check-in [60b409322a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Force the correct join order on timeline generation using a CROSS JOIN.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 60b409322ade042535340df54f297c4e8118ff78
User & Date: drh 2012-10-26 20:46:44.608
Original Comment: For the correct join order on timeline generation using a CROSS JOIN.
Context
2012-10-26
21:34
Add the --deanalyze option to "fossil rebuild" for removing ANALYZE results. We really don't want ANALYZE run on a repository because all the queries are tuned to work without it. Add the ability to pass rebuild arguments to "fossil all rebuild". ... (check-in: 85233c40c9 user: drh tags: trunk)
20:46
Force the correct join order on timeline generation using a CROSS JOIN. ... (check-in: 60b409322a user: drh tags: trunk)
20:33
Merge the optimizations into trunk. ... (check-in: 09681e17bb user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/timeline.c.
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
    @   event.type AS eventType,
    @   (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref
    @     WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
    @       AND tagxref.rid=blob.rid AND tagxref.tagtype>0) AS tags,
    @   tagid AS tagid,
    @   brief AS brief,
    @   event.mtime AS mtime
    @  FROM event JOIN blob 
    @ WHERE blob.rid=event.objid
  ;
  if( zBase==0 ){
    zBase = mprintf(zBaseSql, TAG_BRANCH, TAG_BRANCH);
  }
  return zBase;
}







|







784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
    @   event.type AS eventType,
    @   (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref
    @     WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
    @       AND tagxref.rid=blob.rid AND tagxref.tagtype>0) AS tags,
    @   tagid AS tagid,
    @   brief AS brief,
    @   event.mtime AS mtime
    @  FROM event CROSS JOIN blob 
    @ WHERE blob.rid=event.objid
  ;
  if( zBase==0 ){
    zBase = mprintf(zBaseSql, TAG_BRANCH, TAG_BRANCH);
  }
  return zBase;
}