Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6508/pftijah

Modified Files:
      Tag: XQuery_0-16
        pftijah.mx 
Log Message:
use stable sort to keep Tag and Term indices sorted on both (tag/term and
pre-ides). This gives queries in large documents atleast a 10 fault 
performance improvement.



Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.92.2.12
retrieving revision 1.92.2.13
diff -u -d -r1.92.2.12 -r1.92.2.13
--- pftijah.mx  19 Feb 2007 15:27:38 -0000      1.92.2.12
+++ pftijah.mx  20 Feb 2007 19:00:33 -0000      1.92.2.13
@@ -1061,7 +1061,7 @@
     var tids := bat("tj_globalTags").select(name);
     if (tids.count() = 0) return new(oid,dbl);
     var tid := tids.reverse().fetch(0);
-    var result := indexfetchjoin( new(int,oid).insert(0,tid),
+    var result := indexfetchjoin( new(void,oid).append(tid).seqbase(oid(0)),
                                  bat("tj_" + collName + "_TagIndex"),
                                  bat("tj_" + collName + "_Tags") );
     result := result.reverse().sort().project(dbl(scoreBase)); 
@@ -1512,7 +1512,7 @@
     if ( trace ) tj_trace( "END   p_containing_q_NLLR_frag" );
     var t2 := time();
     if (timing) printf("# p_containing_q_NLLR_frag(): total time: %d\n", t2 - 
t1);
-    
+
     return res;
 }
 
@@ -2568,7 +2568,7 @@
         else # create new index
         {       
                var tmp := tids.kdiff(bat("tj_" + collName + "_pfpre"));
-                tmp := tmp.reverse().sort();
+                tmp := tmp.reverse().ssort();
                var termindex := tmp.hmark([EMAIL 
PROTECTED]).offsetindex(bat("tj_globalTerms").count() + 1);
                var terms := tmp.tmark([EMAIL PROTECTED]);
                # create _TermIndex and _Terms here
@@ -2584,7 +2584,7 @@
                commit();
                
                tmp := tids.semijoin(bat("tj_" + collName + "_pfpre"));
-                tmp := tmp.reverse().sort();
+                tmp := tmp.reverse().ssort();
                var tagindex := tmp.hmark([EMAIL 
PROTECTED]).offsetindex(bat("tj_globalTags").count() + 1);
                var tags := tmp.tmark([EMAIL PROTECTED]);
                # create _Tags and _Tagindex here


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to